From 0c81d347b6856c0e0f1b1ca10654ce47f81f632e Mon Sep 17 00:00:00 2001 From: Andrew Clark Date: Tue, 21 Sep 2021 12:02:14 -0400 Subject: [PATCH] Write artifacts to `build` instead of `build2` Now that all the CI jobs have been migrated to the new build script, we can start renaming the `build2` directory to `build`. Since there are lots of scripts that reference `build2`, including downstream scripts that live outside this repo, I'm going to keep the `build2` directory around as a copy of `build`. Then once all the references are updated, I will delete the copy. --- .circleci/config.yml | 6 ++++++ scripts/rollup/build-all-release-channels.js | 15 +++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 02bbea9ff8..c8232fdf85 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -158,8 +158,10 @@ jobs: - run: yarn build-combined - persist_to_workspace: root: . + # TODO: Migrate scripts to use `build` directory instead of `build2` paths: - build2 + - build get_base_build: docker: *docker @@ -192,8 +194,12 @@ jobs: - run: echo "<< pipeline.git.revision >>" >> build2/COMMIT_SHA # Compress build directory into a single tarball for easy download - run: tar -zcvf ./build2.tgz ./build2 + # TODO: Migrate scripts to use `build` directory instead of `build2` + - run: tar -zcvf ./build.tgz ./build - store_artifacts: path: ./build2.tgz + - store_artifacts: + path: ./build.tgz sizebot: docker: *docker diff --git a/scripts/rollup/build-all-release-channels.js b/scripts/rollup/build-all-release-channels.js index 575f1c9f05..f2a5119502 100644 --- a/scripts/rollup/build-all-release-channels.js +++ b/scripts/rollup/build-all-release-channels.js @@ -57,9 +57,10 @@ if (process.env.CIRCLE_NODE_TOTAL) { processExperimental('./build'); } - // TODO: Currently storing artifacts as `./build2` so that it doesn't conflict - // with old build job. Remove once we migrate rest of build/test pipeline. - fs.renameSync('./build', './build2'); + // TODO: Currently storing a copy of the artifacts as `./build2`, because + // some scripts reference that directory. Remove once we migrate everything to + // reference `./build` instead. + fse.copySync('./build', './build2'); } else { // Running locally, no concurrency. Move each channel's build artifacts into // a temporary directory so that they don't conflict. @@ -85,9 +86,11 @@ if (process.env.CIRCLE_NODE_TOTAL) { mergeDirsSync(experimentalDir + '/', stableDir + '/'); // Now restore the combined directory back to its original name - // TODO: Currently storing artifacts as `./build2` so that it doesn't conflict - // with old build job. Remove once we migrate rest of build/test pipeline. - crossDeviceRenameSync(stableDir, './build2'); + crossDeviceRenameSync(stableDir, './build'); + // TODO: Currently storing a copy of the artifacts as `./build2`, because + // some scripts reference that directory. Remove once we migrate everything to + // reference `./build` instead. + fse.copySync('./build', './build2'); } function buildForChannel(channel, nodeTotal, nodeIndex) {