Use checkout_release_branch from a8c-ci-toolkit - #4472
Conversation
| @@ -127,10 +131,16 @@ steps: | |||
| # Same Docker-on-default-queue pattern as the dev Linux build group | |||
| # (see .buildkite/pipeline.yml): Amazon Linux on `default` lacks | |||
| # `dpkg`/`fakeroot`, so we build inside the Debian Node image. | |||
| # The toolkit is listed so its `environment` hook sets $A8C_CI_TOOLKIT_PLUGIN_DIR | |||
| # before the `docker` plugin resolves the volume below. | |||
| - $CI_TOOLKIT_PLUGIN | |||
| - $DOCKER_PLUGIN: | |||
| image: "$NODE_DOCKER_IMAGE" | |||
| propagate-environment: true | |||
| mount-buildkite-agent: true | |||
| expand-volume-vars: true | |||
| volumes: | |||
| - "$$A8C_CI_TOOLKIT_PLUGIN_DIR:/a8c-ci-toolkit:ro" | |||
There was a problem hiding this comment.
a8c-ci-toolkit plugin from there.
I think that should work in theory, but it might be worth double-checking with some dummy test once a8c-ci-toolkit version 6.3.0 ships. For example, by creating a temporary commit that would use this trick on a dummy step that would use the docker plugin + calls a benign command provided by a8c-ci-toolkit (like hash_file) from within its container.
There was a problem hiding this comment.
Validated via 977fd2b — see #4472 (comment)
Docker mount trick validated on CI ✅The one part of this PR that CI can't exercise on its own is the Linux release build, since the release pipeline only runs at code freeze. So I validated the mechanism directly instead. Temporary commit 977fd2b (reverted in the commit right after) pointed The job passed on the And the The branch is back to normal — the pin reads |
This reverts commit 977fd2b.
Related issues
How AI was used in this PR
Written with Claude Code, and reviewed by me. The mechanical part — swapping call sites and deleting the script — was scripted and applied identically across the 13 repos that carried this file. The Docker-specific part below was hand-written and is the piece worth a careful look.
Proposed Changes
.buildkite/commands/checkout-release-branch.shexisted as a byte-identical copy in 13 repos, so any fix to it had to be made 13 times. It now lives ina8c-ci-toolkitas thecheckout_release_branchcommand, and this repo calls that instead. No behaviour change: the command is a straight port of the deleted script.Studio needed one thing the other repos didn't. The Linux release build runs inside a container via the
dockerplugin, and toolkit commands reach a job by being added to the host's$PATH— which a container doesn't inherit. That step now also loads the toolkit plugin, which exports$A8C_CI_TOOLKIT_PLUGIN_DIR, bind-mounts that directory into the container read-only, and puts itsbin/on the$PATHinside.expand-volume-varsis what makes thedockerplugin interpolate the variable, and the$$defers it to run time rather than pipeline upload time.The Windows step keeps invoking through
bash, which resolves a slash-less filename against$PATH, so no change was needed there.The toolkit pin moves from
6.1.1to6.3.0. I checked the toolkit'sCHANGELOG.mdfor breaking changes between those versions; none apply here.Testing Instructions
Not exercisable before the toolkit release. Once
6.3.0is out, the release pipeline covers all three shapes: the Mac steps (plain host$PATH), the Windows step (bash checkout_release_branch), and the Linux step (mounted into the container) should each check out the release branch as before.Pre-merge Checklist
Merge only after toolkit release
Important
Do not merge until
a8c-ci-toolkit6.3.0is released — the pin doesn't resolve before then, so CI will keep failing until it is.