Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore (azure pipeline) remplace travis and other tools by azure and sonar #20

Merged
merged 5 commits into from
Jan 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .codacy.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .codeclimate.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ storybook/storybook/src/components
storybook/storybook/storybook-static/
storybook/toolkit/public
tmp/
.npmrc

### OSX ###
*.DS_Store
Expand Down
8 changes: 2 additions & 6 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,5 @@ rules:
required_approving_review_count: 1
required_status_checks:
contexts:
- Codacy/PR Quality Review
- codeclimate/diff-coverage
- continuous-integration/travis-ci
- codeclimate/total-coverage
- codeclimate
- WIP
- WIP
- af-react-toolkit-github.CI
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# @axa-fr/react-toolkit

[![Build status](https://dev.azure.com/axaguildev/react-toolkit/_apis/build/status/AxaGuilDEv.react-toolkit?branch=master)](https://dev.azure.com/axaguildev/react-toolkit/_apis/build/status/AxaGuilDEv.react-toolkit?branch=master)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=AxaGuilDEv_react-toolkit&metric=alert_status)](https://sonarcloud.io/dashboard?id=AxaGuilDEv_react-toolkit) [![Reliability](https://sonarcloud.io/api/project_badges/measure?project=AxaGuilDEv_react-toolkit&metric=reliability_rating)](https://sonarcloud.io/component_measures?id=AxaGuilDEv_react-toolkit&metric=reliability_rating) [![Security](https://sonarcloud.io/api/project_badges/measure?project=AxaGuilDEv_react-toolkit&metric=security_rating)](https://sonarcloud.io/component_measures?id=AxaGuilDEv_react-toolkit&metric=security_rating) [![Code Corevage](https://sonarcloud.io/api/project_badges/measure?project=AxaGuilDEv_react-toolkit&metric=coverage)](https://sonarcloud.io/component_measures?id=AxaGuilDEv_react-toolkit&metric=Coverage)
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lernajs.io/)
[![Build Status](https://travis-ci.com/AxaGuilDEv/react-toolkit.svg?branch=master)](https://travis-ci.com/AxaGuilDEv/react-toolkit)
[![Maintainability](https://api.codeclimate.com/v1/badges/502c94217e58384a8a77/maintainability)](https://codeclimate.com/github/AxaGuilDEv/react-toolkit/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/502c94217e58384a8a77/test_coverage)](https://codeclimate.com/github/AxaGuilDEv/react-toolkit/test_coverage)

- [About](#about)
- [Getting Started](#getting-started)
Expand Down
67 changes: 67 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Node.js with React
# Build a Node.js project that uses React.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript

pool:
vmImage: 'Ubuntu 16.04'

steps:
- task: NodeTool@0
inputs:
versionSpec: '8.x'
displayName: 'Install Node.js'

- task: SonarSource.sonarcloud.14d9cde6-c1da-4d55-aa01-2965cd301255.SonarCloudPrepare@1
displayName: 'Prepare analysis on SonarCloud'
inputs:
SonarCloud: SonarCloud
organization: axaguildev
scannerMode: CLI
configMode: manual
cliProjectKey: 'AxaGuilDEv_react-toolkit'
cliProjectName: 'react-toolkit'
extraProperties: |
# Additional properties that will be passed to the scanner,
# Put one key=value per line, example:
sonar.exclusions=**/*.stories.js,**/*.spec.js,**/*.spec.ts,scripts/**,coverage/**,**/node_modules/**,**/dist/**,**/__mocks__/**,examples/**,storybook/**,jest.config.js,gulpfile.js,**/*.scss,**/__snapshots__/**,**/*.svg,**/*.txt,**/*.woff,**/*.ico
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.sourceEncoding=UTF-8
sonar.verbose=true
sonar.host.url=https://sonarcloud.io
sonar.cfamily.build-wrapper-output.bypass=true

- script: |
npm install
npm run bootstrap
displayName: 'npm install and bootstrap'

- script: |
npm test -- --coverage
npm run lint
displayName: 'npm test and lint'

- script: |
git config --global user.email "build-ci@axa.fr"
git config --global user.name "Build-CI"
git reset --hard
git remote set-url origin https://$(Github.Token)@github.com/AxaGuilDEv/react-toolkit.git
git checkout $(Build.SourceBranch)
node ./scripts/npm.js $(NPM_TOKEN)
cp .npmrc $HOME/.npmrc
echo $(Build.SourceBranch)
git status
displayName: 'configuration'

- task: SonarSource.sonarcloud.ce096e50-6155-4de8-8800-4221aaeed4a1.SonarCloudAnalyze@1
displayName: 'Run Code Analysis'

#- task: SonarSource.sonarcloud.38b27399-a642-40af-bb7d-9971f69712e8.SonarCloudPublish@1
# displayName: 'Publish Quality Gate Result'

- script: |
npm run publish -- $(Npm.Publish.Version) --yes --concurrency 1 --force-publish
displayName: 'lerna publish'
condition: and(succeeded(), ne(variables['Npm.Publish.Version'], 'none'))


7 changes: 6 additions & 1 deletion packages/Form/Input/card/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
},
"license": "MIT",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "https://github.com/AxaGuilDEv/react-toolkit.git"
}
}
7 changes: 6 additions & 1 deletion packages/Form/Input/checkbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
},
"license": "MIT",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "https://github.com/AxaGuilDEv/react-toolkit.git"
}
}
7 changes: 6 additions & 1 deletion packages/Form/Input/choice/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
},
"license": "MIT",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "https://github.com/AxaGuilDEv/react-toolkit.git"
}
}
7 changes: 6 additions & 1 deletion packages/Form/Input/date/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
},
"license": "MIT",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "https://github.com/AxaGuilDEv/react-toolkit.git"
}
}
7 changes: 6 additions & 1 deletion packages/Form/Input/file/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
},
"license": "MIT",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "https://github.com/AxaGuilDEv/react-toolkit.git"
}
}
7 changes: 6 additions & 1 deletion packages/Form/Input/number/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
},
"license": "MIT",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "https://github.com/AxaGuilDEv/react-toolkit.git"
}
}
7 changes: 6 additions & 1 deletion packages/Form/Input/pass/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
},
"license": "MIT",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "https://github.com/AxaGuilDEv/react-toolkit.git"
}
}
7 changes: 6 additions & 1 deletion packages/Form/Input/radio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
},
"license": "MIT",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "https://github.com/AxaGuilDEv/react-toolkit.git"
}
}
7 changes: 6 additions & 1 deletion packages/Form/Input/select-multi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
},
"license": "MIT",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "https://github.com/AxaGuilDEv/react-toolkit.git"
}
}
7 changes: 6 additions & 1 deletion packages/Form/Input/select/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
},
"license": "MIT",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "https://github.com/AxaGuilDEv/react-toolkit.git"
}
}
7 changes: 6 additions & 1 deletion packages/Form/Input/slider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
},
"license": "MIT",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "https://github.com/AxaGuilDEv/react-toolkit.git"
}
}
7 changes: 6 additions & 1 deletion packages/Form/Input/switch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
},
"license": "MIT",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "https://github.com/AxaGuilDEv/react-toolkit.git"
}
}
7 changes: 6 additions & 1 deletion packages/Form/Input/text/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
},
"license": "MIT",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "https://github.com/AxaGuilDEv/react-toolkit.git"
}
}
7 changes: 6 additions & 1 deletion packages/Form/Input/textarea/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
},
"license": "MIT",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "https://github.com/AxaGuilDEv/react-toolkit.git"
}
}
7 changes: 6 additions & 1 deletion packages/Form/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
},
"license": "MIT",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "https://github.com/AxaGuilDEv/react-toolkit.git"
}
}
7 changes: 6 additions & 1 deletion packages/Form/filter-inline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
},
"license": "MIT",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "https://github.com/AxaGuilDEv/react-toolkit.git"
}
}
7 changes: 6 additions & 1 deletion packages/Form/filter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
},
"license": "MIT",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "https://github.com/AxaGuilDEv/react-toolkit.git"
}
}
7 changes: 6 additions & 1 deletion packages/Form/steps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
},
"license": "MIT",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "https://github.com/AxaGuilDEv/react-toolkit.git"
}
}
7 changes: 6 additions & 1 deletion packages/Form/summary/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
},
"license": "MIT",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "https://github.com/AxaGuilDEv/react-toolkit.git"
}
}
Loading