Add promoted-release finalize to the production pipeline - #23119
Conversation
|
|
|
|
jkmassel
left a comment
There was a problem hiding this comment.
One easy nit, another suggestion/something to keep an eye out for when you wire it up to Buildkite.
| version_code = version_code.to_s.strip | ||
| UI.user_error!('`version_code` is required, e.g. `version_code:270084231`') if version_code.empty? | ||
| UI.user_error!("`version_code` must be an integer, got #{version_code.inspect}") unless version_code.match?(/\A\d+\z/) | ||
| version_code = Integer(version_code) |
There was a problem hiding this comment.
nit: specifying base10 ensures that we don't get weird behaviour if I pass in 0270084231 instead of 270084231.
| version_code = Integer(version_code) | |
| version_code = Integer(version_code, 10) |
| released_version = marketing_version_for(version_code: version_code) | ||
| UI.important("Finalizing promoted release #{released_version} (build #{version_code})") | ||
|
|
||
| release_url = create_draft_github_release(version_code: version_code, version_name: released_version) |
There was a problem hiding this comment.
Should we check if the given version already exists (for instance, if this lane is run twice)?
Or will we just disable retry in the Buildkite pipeline config?
🤖 Build Failure AnalysisThis build has failures. Claude has analyzed them - check the build annotations for details. |
After the Play submit, resolve the released build's commit from the versionCode's Buildkite build number, create a draft GitHub release tagged at that commit (signed universal APKs attached best-effort), and open a PR bumping trunk's marketing version to the next line. Runs on mac-metal as a step appended after promote_to_production; only failures notify Slack.
Splits the block, promote, and finalize steps out of write_production_release_steps_file so it reads as a clean list and stays under rubocop's MethodLength after the finalize step was added.
Avoids Integer() treating a leading-zero value as octal.
finalize_promoted_release can be re-run for the same build; reuse the existing release (matched by target_commitish) instead of creating a second draft.
895f9c1 to
7669dff
Compare


Description
Adds the git/GitHub ceremony that runs after a build is promoted to production: a
finalize_promoted_releasefastlane lane, appended to the promote-to-production pipeline as amac-metalstep after theandroidpromote step (gated by the same confirmation; skipped if the promote didn't run).versionCode % 1_000_000→ Buildkite build number → that build's commit SHA), so no per-build tagging is needed.26.9 → 27.0); no-op if trunk is already ahead.Testing instructions
No manual test steps. @jkmassel and I discussed and agreed on this testing methodology: this is a best-attempt PR. We'll exercise it as part of an upcoming release and fix any issues in a follow-up PR.