ci(release): trigger the publish build via the Buildkite CLI - #593
Open
dcalhoun wants to merge 1 commit into
Open
ci(release): trigger the publish build via the Buildkite CLI#593dcalhoun wants to merge 1 commit into
dcalhoun wants to merge 1 commit into
Conversation
dcalhoun
force-pushed
the
ci/automate-releases-with-buildkite-cli
branch
from
August 20, 2026 14:22
2148da8 to
1bd4f54
Compare
dcalhoun
changed the base branch from
build/makefile-help-and-release-output
to
trunk
August 20, 2026 14:22
XCFramework BuildThis PR's XCFramework is available for testing. Add the following to your .package(url: "https://github.com/wordpress-mobile/GutenbergKit", branch: "pr-build/593")Built from 32b0cef |
dcalhoun
marked this pull request as ready for review
August 20, 2026 14:31
dcalhoun
marked this pull request as draft
August 20, 2026 14:49
dcalhoun
force-pushed
the
ci/automate-releases-with-buildkite-cli
branch
4 times, most recently
from
August 20, 2026 15:24
6094c35 to
cffeaea
Compare
Step 2 of the release process required opening a Buildkite form and pasting in a commit SHA and version number by hand. `bk build create` accepts those same three inputs, so the release script now triggers the build itself and prints the build URL. The CLI is an optional dependency, detected at run time via `bk auth status` rather than `command -v bk` — an installed-but-unconfigured CLI cannot create builds, and failing after the version bump is already pushed is the worst time to discover that. Without it, the script prints the manual steps and a hint on enabling automation for next time. The hint authenticates via `bk auth login`, which uses OAuth and stores the credential in the OS keyring; `bk configure` warns that reading the token from a config file is deprecated. It requests three scopes — `read_organizations` to complete the login itself, plus `read_pipelines` and `write_builds` to resolve the pipeline slug and create the build. Without `--scopes` the CLI requests every scope the account can reach, which for this account is 35+ including `write_pipelines` and `delete_registries`. A failed trigger warns and falls back to the manual steps rather than exiting non-zero: the version bump has already been pushed at that point, so reporting the whole release as failed would be inaccurate. Triggering immediately is safe. The `:rocket: Publish Swift release` step gates on `depends_on` (validate, lint, tests, XCFramework), so it waits for its dependencies regardless of when the build starts — the browser round-trip was never load-bearing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
dcalhoun
force-pushed
the
ci/automate-releases-with-buildkite-cli
branch
from
August 20, 2026 15:28
cffeaea to
32b0cef
Compare
dcalhoun
marked this pull request as ready for review
August 20, 2026 15:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Step 2 of the release process required opening a Buildkite form and pasting in a commit SHA and version number by hand. The release script now triggers that build itself when the Buildkite CLI (
bk) is available, printing the build URL.Why?
Pasting a SHA into a web form is easy to get wrong, and getting it wrong tags the wrong commit. The script already knows the SHA it just pushed.
How?
bk build createtakes the same three inputs the form does:bk build create -p automattic/gutenbergkit -b trunk \ -c <sha> -e NEW_VERSION=vX.Y.ZThe CLI is an optional dependency, detected at run time:
bk auth status, notcommand -v bk— an installed-but-unconfigured CLI can't create builds, and finding that out after the version bump is pushed is the worst timing.The install hint authenticates via
bk auth login, which uses OAuth and stores the credential in the OS keyring (bk configurewarns that config-file tokens are deprecated). It requests three scopes —read_organizationsto complete the login itself, plusread_pipelinesandwrite_buildsto resolve the pipeline and create the build. Without--scopes,bkrequests every scope the account can reach; on my account that was 35+, includingwrite_pipelinesanddelete_registries.Triggering immediately is safe:
:rocket: Publish Swift releasegates ondepends_on(validate, lint, tests, XCFramework), so it waits for its dependencies regardless of when the build starts.Testing Instructions
Note
Step one requires temporarily commenting out
check_branchandcheck_working_directory.make release VERSION_TYPE=patch DRY_RUN=true— withbkinstalled and authenticated, prints thebk build createcommand it would run; without, prints the manual steps and install hint. Nothing is triggered either way.DRY RUN MODEand closes withThis was a dry run.Important
The live
bk build createcall has not been exercised through the release script. Doing so means triggering a real publish build, so we opted to verify on the next real release. Thebkinvocation itself is known to work against this pipeline, and all four code paths are covered with stubs; a failed trigger degrades to the existing manual process. The one unknown isbk's stdout format on success, which is cosmetic.