@samitouri / QOS-React-2 / commits / 0c81d347b6

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.

Andrew Clark committed Sep 21, 2021 at 12:02 UTC 0c81d347b6856c0e0f1b1ca10654ce47f81f632e
2 files changed +15 -6
.circleci/config.yml
+6
@@ -158,8 +158,10 @@ jobs:
158 - run: yarn build-combined
159 - persist_to_workspace:
160 root: .
161 + # TODO: Migrate scripts to use `build` directory instead of `build2`
162 paths:
163 - build2
164 + - build
165
166 get_base_build:
167 docker: *docker
@@ -192,8 +194,12 @@ jobs:
194 - run: echo "<< pipeline.git.revision >>" >> build2/COMMIT_SHA
195 # Compress build directory into a single tarball for easy download
196 - run: tar -zcvf ./build2.tgz ./build2
197 + # TODO: Migrate scripts to use `build` directory instead of `build2`
198 + - run: tar -zcvf ./build.tgz ./build
199 - store_artifacts:
200 path: ./build2.tgz
201 + - store_artifacts:
202 + path: ./build.tgz
203
204 sizebot:
205 docker: *docker
scripts/rollup/build-all-release-channels.js
+9 -6
@@ -57,9 +57,10 @@ if (process.env.CIRCLE_NODE_TOTAL) {
57 processExperimental('./build');
58 }
59
60 - // TODO: Currently storing artifacts as `./build2` so that it doesn't conflict
61 - // with old build job. Remove once we migrate rest of build/test pipeline.
62 - fs.renameSync('./build', './build2');
60 + // TODO: Currently storing a copy of the artifacts as `./build2`, because
61 + // some scripts reference that directory. Remove once we migrate everything to
62 + // reference `./build` instead.
63 + fse.copySync('./build', './build2');
64 } else {
65 // Running locally, no concurrency. Move each channel's build artifacts into
66 // a temporary directory so that they don't conflict.
@@ -85,9 +86,11 @@ if (process.env.CIRCLE_NODE_TOTAL) {
86 mergeDirsSync(experimentalDir + '/', stableDir + '/');
87
88 // Now restore the combined directory back to its original name
88 - // TODO: Currently storing artifacts as `./build2` so that it doesn't conflict
89 - // with old build job. Remove once we migrate rest of build/test pipeline.
90 - crossDeviceRenameSync(stableDir, './build2');
89 + crossDeviceRenameSync(stableDir, './build');
90 + // TODO: Currently storing a copy of the artifacts as `./build2`, because
91 + // some scripts reference that directory. Remove once we migrate everything to
92 + // reference `./build` instead.
93 + fse.copySync('./build', './build2');
94 }
95
96 function buildForChannel(channel, nodeTotal, nodeIndex) {