From 4e864e14283126ed783a5b8d92705f611d407491 Mon Sep 17 00:00:00 2001 From: Guillaume Chervet Date: Wed, 2 Jan 2019 13:12:00 +0000 Subject: [PATCH 1/5] chore(build) use azure pipeline --- .codacy.yml | 4 -- .codeclimate.yml | 4 -- .gitignore | 1 + .mergify.yml | 8 +-- .npmrc | 1 - .travis.yml | 36 ---------- azure-pipelines.yml | 67 +++++++++++++++++++ packages/Form/Input/card/package.json | 7 +- packages/Form/Input/checkbox/package.json | 7 +- packages/Form/Input/choice/package.json | 7 +- packages/Form/Input/date/package.json | 7 +- packages/Form/Input/file/package.json | 7 +- packages/Form/Input/number/package.json | 7 +- packages/Form/Input/pass/package.json | 7 +- packages/Form/Input/radio/package.json | 7 +- packages/Form/Input/select-multi/package.json | 7 +- packages/Form/Input/select/package.json | 7 +- packages/Form/Input/slider/package.json | 7 +- packages/Form/Input/switch/package.json | 7 +- packages/Form/Input/text/package.json | 7 +- packages/Form/Input/textarea/package.json | 7 +- packages/Form/core/package.json | 7 +- packages/Form/filter-inline/package.json | 7 +- packages/Form/filter/package.json | 7 +- packages/Form/steps/package.json | 7 +- packages/Form/summary/package.json | 7 +- packages/Layout/footer-client/package.json | 7 +- packages/Layout/footer/package.json | 7 +- packages/Layout/header/package.json | 7 +- packages/Modal/boolean/package.json | 7 +- packages/Modal/default/package.json | 7 +- packages/action/package.json | 7 +- packages/alert/package.json | 7 +- packages/all/package.json | 7 +- packages/badge/package.json | 7 +- packages/button/package.json | 7 +- packages/collapse/package.json | 7 +- packages/core/package.json | 7 +- packages/help/package.json | 7 +- packages/highlight/package.json | 7 +- packages/icon/package.json | 7 +- packages/link/package.json | 7 +- packages/list/package.json | 7 +- packages/loader/package.json | 7 +- packages/panel/package.json | 7 +- packages/popover/package.json | 7 +- packages/restitution/package.json | 7 +- packages/status/package.json | 7 +- packages/table/package.json | 7 +- packages/tabs/package.json | 7 +- packages/title/package.json | 7 +- scripts/npm.js | 20 ++++++ 52 files changed, 354 insertions(+), 95 deletions(-) delete mode 100644 .codacy.yml delete mode 100644 .codeclimate.yml delete mode 100644 .npmrc delete mode 100644 .travis.yml create mode 100644 azure-pipelines.yml create mode 100644 scripts/npm.js diff --git a/.codacy.yml b/.codacy.yml deleted file mode 100644 index 2603cb974..000000000 --- a/.codacy.yml +++ /dev/null @@ -1,4 +0,0 @@ -exclude_paths: - - "examples/" - - "**/*.spec.js" - - "**/*.test.js" diff --git a/.codeclimate.yml b/.codeclimate.yml deleted file mode 100644 index 14185db2b..000000000 --- a/.codeclimate.yml +++ /dev/null @@ -1,4 +0,0 @@ -exclude_patterns: - - "examples/" - - "**/*.spec.js" - - "**/*.test.js" diff --git a/.gitignore b/.gitignore index 4c19f1d13..1ddf10488 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ storybook/storybook/src/components storybook/storybook/storybook-static/ storybook/toolkit/public tmp/ +.npmrc ### OSX ### *.DS_Store diff --git a/.mergify.yml b/.mergify.yml index 681d1ef9e..bd721be16 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -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-oidc-github.CI diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 38f11c645..000000000 --- a/.npmrc +++ /dev/null @@ -1 +0,0 @@ -registry=https://registry.npmjs.org diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 56c18b799..000000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -branches: - only: - - master -sudo: required -dist: trusty -language: node_js -env: - - NPM_PUBLISH_VERSION=none -before_script: - - git config --global user.email "build-ci@axa.fr" - - git config --global user.name "Build-CI" -node_js: - - "8" -install: - - npm install - - npm run bootstrap -before_script: - - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - - chmod +x ./cc-test-reporter - - ./cc-test-reporter before-build -script: - - npm test -- --coverage - - npm run lint - - npm run storybook:build - - npm run css:build - - npm run demo:build -deploy: - on: - all_branches: true - condition: $NPM_PUBLISH_VERSION =~ ^major|minor|patch|prerelease$ - provider: script - script: "git reset --hard && git remote set-url origin https://${GH_TOKEN}@github.com/AxaGuilDEv/react-toolkit.git && git checkout ${TRAVIS_BRANCH} && cp .npmrc.template $HOME/.npmrc && npm run publish -- ${NPM_PUBLISH_VERSION} --yes --concurrency 1 --force-publish && node ./scripts/publish-docs.js ${GH_TOKEN}" - skip_cleanup: true -after_script: - - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT - diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..3668d8410 --- /dev/null +++ b/azure-pipelines.yml @@ -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/**,jest.config.js + 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')) + + diff --git a/packages/Form/Input/card/package.json b/packages/Form/Input/card/package.json index 9de1f577f..ce8a50dd9 100644 --- a/packages/Form/Input/card/package.json +++ b/packages/Form/Input/card/package.json @@ -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" } } diff --git a/packages/Form/Input/checkbox/package.json b/packages/Form/Input/checkbox/package.json index 463e22042..729660257 100644 --- a/packages/Form/Input/checkbox/package.json +++ b/packages/Form/Input/checkbox/package.json @@ -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" } } diff --git a/packages/Form/Input/choice/package.json b/packages/Form/Input/choice/package.json index 043a4248a..76d1c3460 100644 --- a/packages/Form/Input/choice/package.json +++ b/packages/Form/Input/choice/package.json @@ -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" } } diff --git a/packages/Form/Input/date/package.json b/packages/Form/Input/date/package.json index d41e944cd..db06bbede 100644 --- a/packages/Form/Input/date/package.json +++ b/packages/Form/Input/date/package.json @@ -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" } } diff --git a/packages/Form/Input/file/package.json b/packages/Form/Input/file/package.json index 62fbff26b..cb9e4dc97 100644 --- a/packages/Form/Input/file/package.json +++ b/packages/Form/Input/file/package.json @@ -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" } } diff --git a/packages/Form/Input/number/package.json b/packages/Form/Input/number/package.json index d10959e54..1fc53e507 100644 --- a/packages/Form/Input/number/package.json +++ b/packages/Form/Input/number/package.json @@ -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" } } diff --git a/packages/Form/Input/pass/package.json b/packages/Form/Input/pass/package.json index 981e4fec8..3211abfe3 100644 --- a/packages/Form/Input/pass/package.json +++ b/packages/Form/Input/pass/package.json @@ -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" } } diff --git a/packages/Form/Input/radio/package.json b/packages/Form/Input/radio/package.json index 7b5650657..45ec9cb6c 100644 --- a/packages/Form/Input/radio/package.json +++ b/packages/Form/Input/radio/package.json @@ -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" } } diff --git a/packages/Form/Input/select-multi/package.json b/packages/Form/Input/select-multi/package.json index f4948779a..04be9fdee 100644 --- a/packages/Form/Input/select-multi/package.json +++ b/packages/Form/Input/select-multi/package.json @@ -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" } } diff --git a/packages/Form/Input/select/package.json b/packages/Form/Input/select/package.json index 959175050..fe9d2f732 100644 --- a/packages/Form/Input/select/package.json +++ b/packages/Form/Input/select/package.json @@ -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" } } diff --git a/packages/Form/Input/slider/package.json b/packages/Form/Input/slider/package.json index dbf6c1422..991787eb9 100644 --- a/packages/Form/Input/slider/package.json +++ b/packages/Form/Input/slider/package.json @@ -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" } } diff --git a/packages/Form/Input/switch/package.json b/packages/Form/Input/switch/package.json index 96b65fa85..17697baf2 100644 --- a/packages/Form/Input/switch/package.json +++ b/packages/Form/Input/switch/package.json @@ -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" } } diff --git a/packages/Form/Input/text/package.json b/packages/Form/Input/text/package.json index 0a92f1de5..00390b88d 100644 --- a/packages/Form/Input/text/package.json +++ b/packages/Form/Input/text/package.json @@ -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" } } diff --git a/packages/Form/Input/textarea/package.json b/packages/Form/Input/textarea/package.json index e7498aa51..f5d1035c7 100644 --- a/packages/Form/Input/textarea/package.json +++ b/packages/Form/Input/textarea/package.json @@ -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" } } diff --git a/packages/Form/core/package.json b/packages/Form/core/package.json index 976f7caa3..e09ad648c 100644 --- a/packages/Form/core/package.json +++ b/packages/Form/core/package.json @@ -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" } } diff --git a/packages/Form/filter-inline/package.json b/packages/Form/filter-inline/package.json index 485b6e390..db58a50d0 100644 --- a/packages/Form/filter-inline/package.json +++ b/packages/Form/filter-inline/package.json @@ -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" } } diff --git a/packages/Form/filter/package.json b/packages/Form/filter/package.json index 2e0d3dd09..e45e7eb46 100644 --- a/packages/Form/filter/package.json +++ b/packages/Form/filter/package.json @@ -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" } } diff --git a/packages/Form/steps/package.json b/packages/Form/steps/package.json index ebb51d427..7e7e071c0 100644 --- a/packages/Form/steps/package.json +++ b/packages/Form/steps/package.json @@ -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" } } diff --git a/packages/Form/summary/package.json b/packages/Form/summary/package.json index 4b271970b..44de73e17 100644 --- a/packages/Form/summary/package.json +++ b/packages/Form/summary/package.json @@ -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" } } diff --git a/packages/Layout/footer-client/package.json b/packages/Layout/footer-client/package.json index 10bfb62b6..710c8defe 100644 --- a/packages/Layout/footer-client/package.json +++ b/packages/Layout/footer-client/package.json @@ -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" } } diff --git a/packages/Layout/footer/package.json b/packages/Layout/footer/package.json index 62e34a306..b0191abb1 100644 --- a/packages/Layout/footer/package.json +++ b/packages/Layout/footer/package.json @@ -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" } } diff --git a/packages/Layout/header/package.json b/packages/Layout/header/package.json index 8fa3ea5ce..54ccaef46 100644 --- a/packages/Layout/header/package.json +++ b/packages/Layout/header/package.json @@ -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" } } diff --git a/packages/Modal/boolean/package.json b/packages/Modal/boolean/package.json index 125dcefbf..49902b964 100644 --- a/packages/Modal/boolean/package.json +++ b/packages/Modal/boolean/package.json @@ -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" } } diff --git a/packages/Modal/default/package.json b/packages/Modal/default/package.json index cf2f1f038..ea900df7f 100644 --- a/packages/Modal/default/package.json +++ b/packages/Modal/default/package.json @@ -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" } } diff --git a/packages/action/package.json b/packages/action/package.json index 1a84bf738..6a309aec1 100644 --- a/packages/action/package.json +++ b/packages/action/package.json @@ -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" } } diff --git a/packages/alert/package.json b/packages/alert/package.json index eeefcbbb7..b4d356f43 100644 --- a/packages/alert/package.json +++ b/packages/alert/package.json @@ -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" } } diff --git a/packages/all/package.json b/packages/all/package.json index 6ddff4c99..2ed533c79 100644 --- a/packages/all/package.json +++ b/packages/all/package.json @@ -58,6 +58,11 @@ }, "license": "MIT", "publishConfig": { - "access": "public" + "access": "public", + "registry": "https://registry.npmjs.org/" + }, +"repository": { + "type": "git", + "url": "https://github.com/AxaGuilDEv/react-toolkit.git" } } diff --git a/packages/badge/package.json b/packages/badge/package.json index 72e7fe704..fad5775de 100644 --- a/packages/badge/package.json +++ b/packages/badge/package.json @@ -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" } } diff --git a/packages/button/package.json b/packages/button/package.json index 6233fb223..8ff30c038 100644 --- a/packages/button/package.json +++ b/packages/button/package.json @@ -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" } } diff --git a/packages/collapse/package.json b/packages/collapse/package.json index 8e18cdf50..fae533e8a 100644 --- a/packages/collapse/package.json +++ b/packages/collapse/package.json @@ -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" } } diff --git a/packages/core/package.json b/packages/core/package.json index 2f2ea00a3..6f5b7c421 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -15,6 +15,11 @@ }, "license": "MIT", "publishConfig": { - "access": "public" + "access": "public", + "registry": "https://registry.npmjs.org/" + }, +"repository": { + "type": "git", + "url": "https://github.com/AxaGuilDEv/react-toolkit.git" } } diff --git a/packages/help/package.json b/packages/help/package.json index 1daac7c82..5f09489a6 100644 --- a/packages/help/package.json +++ b/packages/help/package.json @@ -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" } } diff --git a/packages/highlight/package.json b/packages/highlight/package.json index 969da9c72..8b5aaf402 100644 --- a/packages/highlight/package.json +++ b/packages/highlight/package.json @@ -22,6 +22,11 @@ }, "license": "MIT", "publishConfig": { - "access": "public" + "access": "public", + "registry": "https://registry.npmjs.org/" + }, +"repository": { + "type": "git", + "url": "https://github.com/AxaGuilDEv/react-toolkit.git" } } diff --git a/packages/icon/package.json b/packages/icon/package.json index 3fb81ec06..58e4cfcfc 100644 --- a/packages/icon/package.json +++ b/packages/icon/package.json @@ -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" } } diff --git a/packages/link/package.json b/packages/link/package.json index 313beda94..0a0191c60 100644 --- a/packages/link/package.json +++ b/packages/link/package.json @@ -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" } } diff --git a/packages/list/package.json b/packages/list/package.json index 999828648..0460c508f 100644 --- a/packages/list/package.json +++ b/packages/list/package.json @@ -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" } } diff --git a/packages/loader/package.json b/packages/loader/package.json index 1da10e2be..1a4e7ba2e 100644 --- a/packages/loader/package.json +++ b/packages/loader/package.json @@ -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" } } diff --git a/packages/panel/package.json b/packages/panel/package.json index 440599925..88f1304d3 100644 --- a/packages/panel/package.json +++ b/packages/panel/package.json @@ -22,6 +22,11 @@ }, "license": "MIT", "publishConfig": { - "access": "public" + "access": "public", + "registry": "https://registry.npmjs.org/" + }, +"repository": { + "type": "git", + "url": "https://github.com/AxaGuilDEv/react-toolkit.git" } } diff --git a/packages/popover/package.json b/packages/popover/package.json index 396085114..437977bd0 100644 --- a/packages/popover/package.json +++ b/packages/popover/package.json @@ -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" } } diff --git a/packages/restitution/package.json b/packages/restitution/package.json index 50154d334..5884637d7 100644 --- a/packages/restitution/package.json +++ b/packages/restitution/package.json @@ -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" } } diff --git a/packages/status/package.json b/packages/status/package.json index e7805ebf1..d2a846900 100644 --- a/packages/status/package.json +++ b/packages/status/package.json @@ -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" } } diff --git a/packages/table/package.json b/packages/table/package.json index 76ed3456a..550efc163 100644 --- a/packages/table/package.json +++ b/packages/table/package.json @@ -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" } } diff --git a/packages/tabs/package.json b/packages/tabs/package.json index cd255d180..58e5d28aa 100644 --- a/packages/tabs/package.json +++ b/packages/tabs/package.json @@ -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" } } diff --git a/packages/title/package.json b/packages/title/package.json index c9a131cbc..c1f78af85 100644 --- a/packages/title/package.json +++ b/packages/title/package.json @@ -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" } } diff --git a/scripts/npm.js b/scripts/npm.js new file mode 100644 index 000000000..400a54ee3 --- /dev/null +++ b/scripts/npm.js @@ -0,0 +1,20 @@ +const path = require('path'); +var fs = require('fs'); + +try { + const args = process.argv; + let template = ''; + + if(args.length >= 3){ + const NPM_TOKEN = args[2]; + template = `registry=https://registry.npmjs.org/ +//registry.npmjs.org/:_authToken=${NPM_TOKEN}`; + } else { + template = 'registry=https://registry.npmjs.org/'; + } + const filePath = path.join(__dirname, '../.npmrc'); + fs.writeFileSync(filePath , template, 'utf8'); + +} catch(ex) { + console.error(ex); +} \ No newline at end of file From 82cd90735737c3e9e7ab168eb9dc211170f357ca Mon Sep 17 00:00:00 2001 From: Guillaume Chervet Date: Wed, 2 Jan 2019 14:34:35 +0000 Subject: [PATCH 2/5] WIP --- .mergify.yml | 2 +- README.md | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index bd721be16..91902e178 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -6,4 +6,4 @@ rules: required_status_checks: contexts: - WIP - - af-react-oidc-github.CI + - af-react-toolkit-github.CI diff --git a/README.md b/README.md index 2a37ea2f5..0663fc6b9 100644 --- a/README.md +++ b/README.md @@ -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) From 96e181f7877b7f2e2ab42cffec88cc2c9a982397 Mon Sep 17 00:00:00 2001 From: Guillaume Chervet Date: Wed, 2 Jan 2019 14:45:16 +0000 Subject: [PATCH 3/5] WIP --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3668d8410..739ef62c4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -24,7 +24,7 @@ steps: 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/**,jest.config.js + sonar.exclusions=**/*.stories.js,**/*.spec.js,**/*.spec.ts,scripts/**,coverage/**,**/node_modules/**,**/dist/**,**/__mocks__/**,examples/**,storybook/**,jest.config.js sonar.javascript.lcov.reportPaths=coverage/lcov.info sonar.sourceEncoding=UTF-8 sonar.verbose=true From 579f9dbd4a8cb69c67060f942e289f6429058825 Mon Sep 17 00:00:00 2001 From: Guillaume Chervet Date: Wed, 2 Jan 2019 15:14:35 +0000 Subject: [PATCH 4/5] WIP --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 739ef62c4..840f3fbca 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -24,7 +24,7 @@ steps: 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 + sonar.exclusions=**/*.stories.js,**/*.spec.js,**/*.spec.ts,scripts/**,coverage/**,**/node_modules/**,**/dist/**,**/__mocks__/**,examples/**,storybook/**,jest.config.js,**/*.scss,**/__snapshots__/**,**/*.svg,**/*.txt,**/*.woff,**/*.ico sonar.javascript.lcov.reportPaths=coverage/lcov.info sonar.sourceEncoding=UTF-8 sonar.verbose=true From 113df68a69c63599d8e64e18fe0037931bd067a3 Mon Sep 17 00:00:00 2001 From: Guillaume Chervet Date: Wed, 2 Jan 2019 15:35:11 +0000 Subject: [PATCH 5/5] WIP --- azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 840f3fbca..9dfd9c3d2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -24,7 +24,7 @@ steps: 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,**/*.scss,**/__snapshots__/**,**/*.svg,**/*.txt,**/*.woff,**/*.ico + 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 @@ -56,8 +56,8 @@ steps: - 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' +#- 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