From 1317239f04039f178517c93d43a97950f8a3c0e6 Mon Sep 17 00:00:00 2001 From: Howard Braham Date: Tue, 5 Sep 2023 19:49:49 -0700 Subject: [PATCH 1/5] feat: CircleCI is now storing test builds and test-flask builds --- .circleci/config.yml | 4 ++++ development/metamaskbot-build-announce.js | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1755e91b46a1..e0246e2514ed 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1162,6 +1162,10 @@ jobs: - store_artifacts: path: builds-mmi destination: builds-mmi + - store_artifacts: + path: builds-test + - store_artifacts: + path: builds-test-flask - store_artifacts: path: coverage destination: coverage diff --git a/development/metamaskbot-build-announce.js b/development/metamaskbot-build-announce.js index 16cbef70513e..e8188aeab0e7 100755 --- a/development/metamaskbot-build-announce.js +++ b/development/metamaskbot-build-announce.js @@ -81,6 +81,18 @@ async function start() { return `${platform}`; }) .join(', '); + const testBuildLinks = platforms + .map((platform) => { + const url = `${BUILD_LINK_BASE}/builds-test/metamask-${platform}-${VERSION}.zip`; + return `${platform}`; + }) + .join(', '); + const testFlaskBuildLinks = platforms + .map((platform) => { + const url = `${BUILD_LINK_BASE}/builds-test-flask/metamask-flask-${platform}-${VERSION}-flask.0.zip`; + return `${platform}`; + }) + .join(', '); // links to bundle browser builds const bundles = {}; @@ -147,6 +159,8 @@ async function start() { `builds (beta): ${betaBuildLinks}`, `builds (flask): ${flaskBuildLinks}`, `builds (MMI): ${mmiBuildLinks}`, + `builds (test): ${testBuildLinks}`, + `builds (test-flask): ${testFlaskBuildLinks}`, `build viz: ${depVizLink}`, `mv3: ${moduleInitStatsBackgroundLink}`, `mv3: ${moduleInitStatsUILink}`, From 213396b68eea40516e931ce3517cff9b81ebc67a Mon Sep 17 00:00:00 2001 From: Howard Braham Date: Tue, 5 Sep 2023 19:57:06 -0700 Subject: [PATCH 2/5] storing earlier --- .circleci/config.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index e0246e2514ed..e381f2bf73f1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -573,6 +573,9 @@ jobs: - run: name: Move test zips to 'builds-test' to avoid conflict with production build command: mv ./builds ./builds-test-flask + - store_artifacts: + path: builds-test-flask + destination: builds-test-flask - persist_to_workspace: root: . paths: @@ -615,6 +618,9 @@ jobs: - run: name: Move test zips to 'builds-test' to avoid conflict with production build command: mv ./builds ./builds-test + - store_artifacts: + path: builds-test + destination: builds-test - persist_to_workspace: root: . paths: From 364d06ec18e4416db382f88bf7bd8efec45ad078 Mon Sep 17 00:00:00 2001 From: Howard Braham Date: Tue, 12 Sep 2023 12:16:04 -0700 Subject: [PATCH 3/5] using the CircleCI cache to move data between jobs that aren't `requires` --- .circleci/config.yml | 15 ++++++++++----- development/metamaskbot-build-announce.js | 14 +++++++++----- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e381f2bf73f1..dc83e840d689 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -568,14 +568,17 @@ jobs: name: Build extension for testing command: yarn build:test:flask - run: - name: Move test build to 'dist-test' to avoid conflict with production build + name: Move test build to 'dist-test-flask' to avoid conflict with production build command: mv ./dist ./dist-test-flask - run: - name: Move test zips to 'builds-test' to avoid conflict with production build + name: Move test zips to 'builds-test-flask' to avoid conflict with production build command: mv ./builds ./builds-test-flask + - save_cache: + key: builds-test-flask-{{ .Environment.CIRCLE_WORKFLOW_ID }} + paths: + - builds-test-flask - store_artifacts: path: builds-test-flask - destination: builds-test-flask - persist_to_workspace: root: . paths: @@ -595,7 +598,7 @@ jobs: name: Move test build to 'dist-test' to avoid conflict with production build command: mv ./dist ./dist-test-mv3 - run: - name: Move test zips to 'builds-test' to avoid conflict with production build + name: Move test zips to 'builds-test-mv3' to avoid conflict with production build command: mv ./builds ./builds-test-mv3 - persist_to_workspace: root: . @@ -620,7 +623,6 @@ jobs: command: mv ./builds ./builds-test - store_artifacts: path: builds-test - destination: builds-test - persist_to_workspace: root: . paths: @@ -1144,6 +1146,9 @@ jobs: - checkout - attach_workspace: at: . + - restore_cache: + keys: + - builds-test-flask-{{ .Environment.CIRCLE_WORKFLOW_ID }} - run: name: build:source-map-explorer command: ./development/source-map-explorer.sh diff --git a/development/metamaskbot-build-announce.js b/development/metamaskbot-build-announce.js index e8188aeab0e7..e49bd848ca55 100755 --- a/development/metamaskbot-build-announce.js +++ b/development/metamaskbot-build-announce.js @@ -39,15 +39,19 @@ function getPercentageChange(from, to) { } async function start() { - const { GITHUB_COMMENT_TOKEN, CIRCLE_PULL_REQUEST } = process.env; + const { + GITHUB_COMMENT_TOKEN, + CIRCLE_PULL_REQUEST, + CIRCLE_SHA1, + CIRCLE_BUILD_NUM, + CIRCLE_WORKFLOW_JOB_ID, + PARENT_COMMIT, + } = process.env; + console.log('CIRCLE_PULL_REQUEST', CIRCLE_PULL_REQUEST); - const { CIRCLE_SHA1 } = process.env; console.log('CIRCLE_SHA1', CIRCLE_SHA1); - const { CIRCLE_BUILD_NUM } = process.env; console.log('CIRCLE_BUILD_NUM', CIRCLE_BUILD_NUM); - const { CIRCLE_WORKFLOW_JOB_ID } = process.env; console.log('CIRCLE_WORKFLOW_JOB_ID', CIRCLE_WORKFLOW_JOB_ID); - const { PARENT_COMMIT } = process.env; console.log('PARENT_COMMIT', PARENT_COMMIT); if (!CIRCLE_PULL_REQUEST) { From 1705077e2f10e647beaa8b23674bcab1fa2725fb Mon Sep 17 00:00:00 2001 From: Howard Braham Date: Thu, 14 Sep 2023 01:37:34 -0700 Subject: [PATCH 4/5] trying with CIRCLE_SHA1 to support "Rerun workflow from failed" --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index dc83e840d689..172956a55f83 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -574,7 +574,7 @@ jobs: name: Move test zips to 'builds-test-flask' to avoid conflict with production build command: mv ./builds ./builds-test-flask - save_cache: - key: builds-test-flask-{{ .Environment.CIRCLE_WORKFLOW_ID }} + key: builds-test-flask-{{ .Environment.CIRCLE_SHA1 }} paths: - builds-test-flask - store_artifacts: @@ -1148,7 +1148,7 @@ jobs: at: . - restore_cache: keys: - - builds-test-flask-{{ .Environment.CIRCLE_WORKFLOW_ID }} + - builds-test-flask-{{ .Environment.CIRCLE_SHA1 }} - run: name: build:source-map-explorer command: ./development/source-map-explorer.sh From b8d9fa4cb10f192ed5bc56ab7aa655e334754b69 Mon Sep 17 00:00:00 2001 From: Howard Braham Date: Wed, 20 Sep 2023 22:39:48 -0700 Subject: [PATCH 5/5] no longer need the save_cache stuff --- .circleci/config.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 172956a55f83..ec231e57900c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -573,12 +573,6 @@ jobs: - run: name: Move test zips to 'builds-test-flask' to avoid conflict with production build command: mv ./builds ./builds-test-flask - - save_cache: - key: builds-test-flask-{{ .Environment.CIRCLE_SHA1 }} - paths: - - builds-test-flask - - store_artifacts: - path: builds-test-flask - persist_to_workspace: root: . paths: @@ -621,8 +615,6 @@ jobs: - run: name: Move test zips to 'builds-test' to avoid conflict with production build command: mv ./builds ./builds-test - - store_artifacts: - path: builds-test - persist_to_workspace: root: . paths: @@ -1146,9 +1138,6 @@ jobs: - checkout - attach_workspace: at: . - - restore_cache: - keys: - - builds-test-flask-{{ .Environment.CIRCLE_SHA1 }} - run: name: build:source-map-explorer command: ./development/source-map-explorer.sh