From b705947c81f9888c6e071312047b8f26fc3033a8 Mon Sep 17 00:00:00 2001 From: Fabian Weber Date: Wed, 4 Sep 2019 11:10:12 +0200 Subject: [PATCH 1/5] remove upload from most PRs --- .circleci/config.yml | 38 ++++++-------------------------------- 1 file changed, 6 insertions(+), 32 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f104c7c895..2e186b228b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -211,15 +211,6 @@ jobs: git merge origin/master --no-edit git push - # store artifacts to check a branch as a staging build - upload: - executor: node - steps: - - attach_workspace: - at: *WORKSPACE - - store_artifacts: - path: *DIST - workflows: version: 2 @@ -255,10 +246,10 @@ workflows: requires: - security - lint - - - upload: - requires: - - build + filters: + branches: + only: + - master - deploy2s3: requires: @@ -267,7 +258,6 @@ workflows: filters: branches: only: - - develop - master - testE2e: @@ -287,27 +277,11 @@ workflows: only: - develop jobs: - - build - - upload: - requires: - - build - - release: - requires: - - upload + - release releaseManually: jobs: - - build: - filters: - branches: - only: - - release - - upload: - requires: - - build - - release: - requires: - - upload + - release mergeBack: jobs: - mergeBack: From 23a5e01825e9cc61702184b1e19ffee38aacef3e Mon Sep 17 00:00:00 2001 From: Fabian Weber Date: Wed, 4 Sep 2019 11:48:09 +0200 Subject: [PATCH 2/5] removed build step as not neded --- .circleci/config.yml | 88 +------------------------------------------- 1 file changed, 2 insertions(+), 86 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2e186b228b..70f20982ce 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,9 +3,7 @@ version: 2.1 # Here we define all the paths and versions of images we want to play with aliases: # Define paths and never think about them again - - &GAIA /tmp/gaia - &WORKSPACE /tmp/voyager - - &DIST /tmp/voyager/dist # Pick docker versions here only, then use the aliases in the executors definition - &docker-node tendermintdev/voyager_node - &docker-browsers tendermintdev/voyager_node_browser @@ -29,41 +27,6 @@ commands: - node_modules key: v4-dependencies-root-{{ checksum "package.json" }} - sync: - parameters: - dist_path: - type: string - steps: - - run: - name: Set default environment variables - command: | - cd && touch $BASH_ENV - - if [ "${CIRCLE_BRANCH}" = "master" ]; then - echo 'export DISTRIBUTION_ID=E3NNXI2PHNC362' >> $BASH_ENV - - echo 'export BUCKET_NAME=lunie.io' >> $BASH_ENV - else - echo 'export DISTRIBUTION_ID=E1KBKFOGFYCD32' >> $BASH_ENV - echo 'export BUCKET_NAME=staging.lunie.io' >> $BASH_ENV - fi - - run: - name: Sync dist folder to s3 bucket - command: | - source $BASH_ENV - cd << parameters.dist_path >> - - echo "deployment job ID = $CIRCLE_BUILD_NUM
" >> version.html - echo "deployment job URL = $CIRCLE_BUILD_URL
" >> version.html - - aws s3 sync . s3://$BUCKET_NAME --delete - - run: - name: Invalidate the cloudfront distribution - command: | - source $BASH_ENV - - aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --path "/*" - # a reusable executor executors: web: @@ -89,24 +52,6 @@ executors: AWS_REGION: us-east-1 jobs: - build: - executor: web - steps: - - checkout - - yarn-install - - run: | - mkdir -p dist - - if [ "${CIRCLE_BRANCH}" = "master" ]; then - RELEASE=true CIRCLECI=true yarn build - else - CIRCLECI=true yarn build - fi - - persist_to_workspace: - root: *WORKSPACE - paths: - - dist - pendingUpdated: executor: node steps: @@ -175,14 +120,6 @@ jobs: path: ./screenshots when: on_fail - deploy2s3: - executor: web_deploy - steps: - - attach_workspace: - at: *WORKSPACE - - sync: - dist_path: *DIST - # Create release. release: executor: node @@ -192,9 +129,7 @@ jobs: yarn add simsala git config user.email "bot@lunie.io" git config user.name "Lunie Bot" - REPO_ID=99653950 - BUILD_NUM=`expr $CIRCLE_BUILD_NUM - 1` #hacky as it assumes the build step ran before this step - node node_modules/simsala/src/cli.js release-candidate --semver prerelease --pending-path ./changes --owner luniehq --repository lunie --token $GIT_BOT_TOKEN --message "Please manually test before merging this to master here" + node node_modules/simsala/src/cli.js release-candidate --semver prerelease --pending-path ./changes --owner luniehq --repository lunie --token $GIT_BOT_TOKEN --message "Please manually test before merging this to master" # Push merges to master immediatly back to develop to stay in sync mergeBack: @@ -214,7 +149,7 @@ jobs: workflows: version: 2 - build-and-deploy: + test: jobs: # Static checks before - pendingUpdated: @@ -241,25 +176,6 @@ workflows: branches: ignore: release - - build: - # no heavy lifting if other portion fails - requires: - - security - - lint - filters: - branches: - only: - - master - - - deploy2s3: - requires: - - testUnit - - build - filters: - branches: - only: - - master - - testE2e: filters: branches: From b75eeb115838770d32d26513248660206fc1d2c3 Mon Sep 17 00:00:00 2001 From: Fabian Weber Date: Wed, 4 Sep 2019 12:20:55 +0200 Subject: [PATCH 3/5] changelog --- changes/fabo_remove-upload | 1 + 1 file changed, 1 insertion(+) create mode 100644 changes/fabo_remove-upload diff --git a/changes/fabo_remove-upload b/changes/fabo_remove-upload new file mode 100644 index 0000000000..0118eb9a43 --- /dev/null +++ b/changes/fabo_remove-upload @@ -0,0 +1 @@ +[Repository] [#2944](https://github.com/cosmos/lunie/pull/2944) Remove S3 upload from CI @faboweb \ No newline at end of file From 96ddde1df3a890c7d7ddc5f77e983c60a850729d Mon Sep 17 00:00:00 2001 From: Fabian Weber Date: Wed, 4 Sep 2019 12:24:10 +0200 Subject: [PATCH 4/5] manual release only on release --- .circleci/config.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 70f20982ce..153c21b953 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -197,7 +197,11 @@ workflows: releaseManually: jobs: - - release + - release: + filters: + branches: + only: release + mergeBack: jobs: - mergeBack: From a4545060f54f123a743539e26f7e7e36ff1e85de Mon Sep 17 00:00:00 2001 From: Col Date: Wed, 4 Sep 2019 14:37:27 +0200 Subject: [PATCH 5/5] Update .circleci/config.yml Typo --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 153c21b953..66db6f2136 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -131,7 +131,7 @@ jobs: git config user.name "Lunie Bot" node node_modules/simsala/src/cli.js release-candidate --semver prerelease --pending-path ./changes --owner luniehq --repository lunie --token $GIT_BOT_TOKEN --message "Please manually test before merging this to master" - # Push merges to master immediatly back to develop to stay in sync + # Push merges to master immediately back to develop to stay in sync mergeBack: executor: node steps: