Skip to content

Commit

Permalink
Write artifacts to build instead of build2
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
acdlite committed Sep 21, 2021
1 parent baff3f2 commit 0c81d34
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
15 changes: 9 additions & 6 deletions scripts/rollup/build-all-release-channels.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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) {
Expand Down

0 comments on commit 0c81d34

Please sign in to comment.