Skip to content

Add promoted-release finalize to the production pipeline - #23119

Merged
oguzkocer merged 4 commits into
trunkfrom
task/finalize-production-release
Jul 21, 2026
Merged

Add promoted-release finalize to the production pipeline#23119
oguzkocer merged 4 commits into
trunkfrom
task/finalize-production-release

Conversation

@oguzkocer

Copy link
Copy Markdown
Contributor

Description

Adds the git/GitHub ceremony that runs after a build is promoted to production: a finalize_promoted_release fastlane lane, appended to the promote-to-production pipeline as a mac-metal step after the android promote step (gated by the same confirmation; skipped if the promote didn't run).

  • Resolves the released build's commit from the versionCode (versionCode % 1_000_000 → Buildkite build number → that build's commit SHA), so no per-build tagging is needed.
  • Creates a draft GitHub release tagged at that commit (flips to publishing once the flow is proven), with the Play-signed universal APKs attached best-effort.
  • Opens a PR bumping trunk's marketing version to the next line (e.g. 26.9 → 27.0); no-op if trunk is already ahead.
  • Notifies Slack on failure only.

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.

@oguzkocer oguzkocer added this to the 27.0 milestone Jul 21, 2026
@dangermattic

dangermattic commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator
1 Warning
⚠️ This PR is assigned to the milestone 27.0. The due date for this milestone has already passed.
Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished.

Generated by 🚫 Danger

@wpmobilebot

wpmobilebot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

App Icon📲 You can test the changes from this Pull Request in WordPress Android by scanning the QR code below to install the corresponding build.

App NameWordPress Android
Build TypeDebug
Versionpr23119-7669dff
Build Number1498
Application IDorg.wordpress.android.prealpha
Commit7669dff
Installation URL79cd8ijm2h790
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

wpmobilebot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

App Icon📲 You can test the changes from this Pull Request in Jetpack Android by scanning the QR code below to install the corresponding build.

App NameJetpack Android
Build TypeDebug
Versionpr23119-7669dff
Build Number1498
Application IDcom.jetpack.android.prealpha
Commit7669dff
Installation URL4uj3trjocgm98
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@oguzkocer
oguzkocer marked this pull request as ready for review July 21, 2026 04:19
@oguzkocer
oguzkocer requested a review from a team as a code owner July 21, 2026 04:19
@oguzkocer
oguzkocer requested a review from jkmassel July 21, 2026 04:19

@jkmassel jkmassel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One easy nit, another suggestion/something to keep an eye out for when you wire it up to Buildkite.

Comment thread fastlane/lanes/promote.rb Outdated
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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: specifying base10 ensures that we don't get weird behaviour if I pass in 0270084231 instead of 270084231.

Suggested change
version_code = Integer(version_code)
version_code = Integer(version_code, 10)

@oguzkocer oguzkocer Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in feda64b.

Comment thread fastlane/lanes/promote.rb
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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 7669dff.

@wpmobilebot

Copy link
Copy Markdown
Contributor

🤖 Build Failure Analysis

This 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.
@oguzkocer
oguzkocer force-pushed the task/finalize-production-release branch from 895f9c1 to 7669dff Compare July 21, 2026 20:12
@oguzkocer
oguzkocer enabled auto-merge (squash) July 21, 2026 20:13
@oguzkocer
oguzkocer merged commit ee60eb5 into trunk Jul 21, 2026
17 of 22 checks passed
@oguzkocer
oguzkocer deleted the task/finalize-production-release branch July 21, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants