From b2f02300a3ba098c84b385523aeaf1f09fe22f8e Mon Sep 17 00:00:00 2001 From: kumavis Date: Fri, 30 Mar 2018 01:01:16 -0700 Subject: ci - run screenshotter --- .circleci/config.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index ae6f44c8a..ef08d4c48 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,6 +19,10 @@ workflows: requires: - prep-build - prep-deps-npm + - test-screens: + requires: + - prep-build + - prep-deps-npm - test-unit: requires: - prep-deps-npm @@ -45,6 +49,7 @@ workflows: - test-lint - test-unit - test-e2e + - test-screens - test-integration-mascara-chrome - test-integration-mascara-firefox - test-integration-flat-chrome @@ -145,6 +150,22 @@ jobs: path: test-artifacts destination: test-artifacts + test-screens: + docker: + - image: circleci/node:8-browsers + steps: + - checkout + - restore_cache: + key: dependency-cache-{{ checksum "package-lock.json" }} + - restore_cache: + key: build-cache-{{ .Revision }} + - run: + name: Test + command: npm run test:screens + - store_artifacts: + path: test-artifacts + destination: test-artifacts + test-unit: docker: - image: circleci/node:8-browsers -- cgit v1.2.3 From 86c768dfb098e5e0166ec3a007871597476d6cf2 Mon Sep 17 00:00:00 2001 From: kumavis Date: Fri, 30 Mar 2018 15:36:22 -0700 Subject: ci - build:announce - rewrite github comment to include walkthrough gif --- .circleci/config.yml | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 737fc3398..5512bf4c9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -114,16 +114,30 @@ jobs: command: | CIRCLE_PR_NUMBER="${CIRCLE_PR_NUMBER:-${CIRCLE_PULL_REQUEST##*/}}" SHORT_SHA1=$(echo $CIRCLE_SHA1 | cut -c 1-7) - BUILD_LINK_BASE="https://$CIRCLE_BUILD_NUM-42009758-gh.circle-artifacts.com/0/builds" + BUILD_LINK_BASE="https://$CIRCLE_BUILD_NUM-42009758-gh.circle-artifacts.com/0" VERSION=$(node -p 'require("./dist/chrome/manifest.json").version') - MASCARA="$BUILD_LINK_BASE/mascara/home.html" - CHROME="$BUILD_LINK_BASE/metamask-chrome-$VERSION.zip" - FIREFOX="$BUILD_LINK_BASE/metamask-firefox-$VERSION.zip" - OPERA="$BUILD_LINK_BASE/metamask-opera-$VERSION.zip" - EDGE="$BUILD_LINK_BASE/metamask-edge-$VERSION.zip" - COMMENT_MAIN="Builds ready [$SHORT_SHA1]: [mascara][mascara], [chrome][chrome], [firefox][firefox], [edge][edge], [opera][opera]" - COMMENT_LINKS="[mascara]:$MASCARA\n[chrome]:$CHROME\n[firefox]:$FIREFOX\n[opera]:$OPERA\n[edge]:$EDGE\n" - COMMENT_BODY="$COMMENT_MAIN\n\n$COMMENT_LINKS" + + MASCARA="$BUILD_LINK_BASE/builds/mascara/home.html" + CHROME="$BUILD_LINK_BASE/builds/metamask-chrome-$VERSION.zip" + FIREFOX="$BUILD_LINK_BASE/builds/metamask-firefox-$VERSION.zip" + EDGE="$BUILD_LINK_BASE/builds/metamask-edge-$VERSION.zip" + OPERA="$BUILD_LINK_BASE/builds/metamask-opera-$VERSION.zip" + WALKTHROUGH="$BUILD_LINK_BASE/test-artifacts/screens/walkthrough%20%28en%29.gif" + + read -d '' COMMENT_BODY < + + Builds ready [$SHORT_SHA1]: + mascara, + chrome, + firefox, + edge, + opera + + + + EOF + JSON_PAYLOAD="{\"body\":\"$COMMENT_BODY\"}" POST_COMMENT_URI="https://api.github.com/repos/metamask/metamask-extension/issues/$CIRCLE_PR_NUMBER/comments" echo "Announcement:\n$COMMENT_BODY" -- cgit v1.2.3 From 213496f19008f922300b21cd04a48b09bd021173 Mon Sep 17 00:00:00 2001 From: kumavis Date: Fri, 30 Mar 2018 15:53:45 -0700 Subject: ci - build:announce - break out into shell script --- .circleci/config.yml | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 5512bf4c9..2ba5b8e12 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -111,38 +111,7 @@ jobs: destination: builds - run: name: build:announce - command: | - CIRCLE_PR_NUMBER="${CIRCLE_PR_NUMBER:-${CIRCLE_PULL_REQUEST##*/}}" - SHORT_SHA1=$(echo $CIRCLE_SHA1 | cut -c 1-7) - BUILD_LINK_BASE="https://$CIRCLE_BUILD_NUM-42009758-gh.circle-artifacts.com/0" - VERSION=$(node -p 'require("./dist/chrome/manifest.json").version') - - MASCARA="$BUILD_LINK_BASE/builds/mascara/home.html" - CHROME="$BUILD_LINK_BASE/builds/metamask-chrome-$VERSION.zip" - FIREFOX="$BUILD_LINK_BASE/builds/metamask-firefox-$VERSION.zip" - EDGE="$BUILD_LINK_BASE/builds/metamask-edge-$VERSION.zip" - OPERA="$BUILD_LINK_BASE/builds/metamask-opera-$VERSION.zip" - WALKTHROUGH="$BUILD_LINK_BASE/test-artifacts/screens/walkthrough%20%28en%29.gif" - - read -d '' COMMENT_BODY < - - Builds ready [$SHORT_SHA1]: - mascara, - chrome, - firefox, - edge, - opera - - - - EOF - - JSON_PAYLOAD="{\"body\":\"$COMMENT_BODY\"}" - POST_COMMENT_URI="https://api.github.com/repos/metamask/metamask-extension/issues/$CIRCLE_PR_NUMBER/comments" - echo "Announcement:\n$COMMENT_BODY" - echo "Posting to $POST_COMMENT_URI" - curl -d "$JSON_PAYLOAD" -H "Authorization: token $GITHUB_COMMENT_TOKEN" $POST_COMMENT_URI + command: ./development/metamaskbot-build-announce prep-scss: docker: -- cgit v1.2.3 From f13733c79059a8ee928c92c1e5c1abe206e303ef Mon Sep 17 00:00:00 2001 From: kumavis Date: Fri, 30 Mar 2018 16:03:54 -0700 Subject: ci - build:announce - fix shell script path --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 2ba5b8e12..3c41c5054 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -111,7 +111,7 @@ jobs: destination: builds - run: name: build:announce - command: ./development/metamaskbot-build-announce + command: ./development/metamaskbot-build-announce.sh prep-scss: docker: -- cgit v1.2.3 From 6d6fc7df1ccb02f53ca9920da8e08a20a2f868c7 Mon Sep 17 00:00:00 2001 From: kumavis Date: Fri, 30 Mar 2018 17:27:33 -0700 Subject: ci - build:announce - fix script path --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 3c41c5054..b0bd97ef0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -111,7 +111,7 @@ jobs: destination: builds - run: name: build:announce - command: ./development/metamaskbot-build-announce.sh + command: ./development/metamaskbot-build-announce.js prep-scss: docker: -- cgit v1.2.3 From 6d3da95a95790361aec4409eb67b4ec2649c4455 Mon Sep 17 00:00:00 2001 From: kumavis Date: Fri, 30 Mar 2018 17:59:15 -0700 Subject: ci - breakout announce job to upload builds and screenshots --- .circleci/config.yml | 48 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 13 deletions(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index b0bd97ef0..14d693d7d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,12 +17,17 @@ workflows: - prep-deps-npm - test-e2e: requires: - - prep-build - prep-deps-npm - - test-screens: + - prep-build + - job-screens: requires: + - prep-deps-npm - prep-build + - job-announce: + requires: - prep-deps-npm + - prep-build + - job-screens - test-unit: requires: - prep-deps-npm @@ -49,7 +54,7 @@ workflows: - test-lint - test-unit - test-e2e - - test-screens + - job-screens - test-integration-mascara-chrome - test-integration-mascara-firefox - test-integration-flat-chrome @@ -103,15 +108,7 @@ jobs: key: build-cache-{{ .Revision }} paths: - dist - - store_artifacts: - path: dist/mascara - destination: builds/mascara - - store_artifacts: - path: builds - destination: builds - - run: - name: build:announce - command: ./development/metamaskbot-build-announce.js + - builds prep-scss: docker: @@ -159,7 +156,7 @@ jobs: path: test-artifacts destination: test-artifacts - test-screens: + job-screens: docker: - image: circleci/node:8-browsers steps: @@ -171,9 +168,34 @@ jobs: - run: name: Test command: npm run test:screens + - save_cache: + key: job-screens-{{ .Revision }} + paths: + - test-artifacts + + job-announce: + docker: + - image: circleci/node:8-browsers + steps: + - checkout + - restore_cache: + key: dependency-cache-{{ checksum "package-lock.json" }} + - restore_cache: + key: build-cache-{{ .Revision }} + - restore_cache: + key: job-screens-{{ .Revision }} + - store_artifacts: + path: dist/mascara + destination: builds/mascara + - store_artifacts: + path: builds + destination: builds - store_artifacts: path: test-artifacts destination: test-artifacts + - run: + name: build:announce + command: ./development/metamaskbot-build-announce.js test-unit: docker: -- cgit v1.2.3