Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tooling] Create a Single, Unified GitHub Releases for WP Alpha, WP Beta & JP Beta #15319

Merged
merged 12 commits into from
Sep 14, 2021

Conversation

AliSoftware
Copy link
Contributor

@AliSoftware AliSoftware commented Sep 13, 2021

This is part of project paaHJt-2s9-p2

ℹ️ This PR targets release/18.2 in the hope I get the occasion to use it in this release in case it's merged in time.

What it does

Now that #15273 has been merged and the 3 Release Builds (WP Alpha, WP Beta, JP Beta) are done in parallel, this PR is now able to create a single GitHub Release for all 3 builds, instead of creating one GitHub Release for each like before.

How

  • Refactor the create_gh_release lane to be able to include multiple assets for multiple apps and versions at once, merging release notes as necessary into one description.
  • Update the YARD doc of build_* lanes to mention the app: parameters and update their call to create_gh_release
  • Update the .circleci/config.yml file to call create_gh_release with the 3 build artifacts only created once the 3 parallel builds have finished.

To Test

  • Run git checkout -b ci-test/pr15319 origin/jetpack-infra/unified-gh-release^1 to cut a new branch from the commit before the tip of this one.
    • This will include the debug commit 1e5c779 – which changes the versionName to a dummy 18.2-rc-999, and disables upload_to_playstore:true and the slack action – but not include the last commit of this branch which reverts those debug changes.
    • This is done to avoid noise during testing, but also to ensure the test GitHub Release gets a new name (instead of being auto-matched with existing tag 18.2-rc-3), and so that the builds won't fail with "versionCode already exists in PlayStore"
  • Push your new test branch to origin: git push -u origin ci-test/pr15319
  • Trigger a release build: bundle exec fastlane trigger_release_build branch_to_build:ci-test/pr15319
  • Wait for the CI workflow to finish, then check that a single, unified GitHub Release draft has been created.

The generated GitHub Release draft should:

  • Point to the commit sha1 of your ci-test/pr15319 branch, which should be 1e5c7795f269cb7e340bb9405dadd11839d59b4f
  • Be titled "18.2-rc-999"
  • Contain BOTH the WordPress and Jetpack release notes or 18.2 – as found in WordPress/{metadata,jetpack_metadata}/release_notes.txt files
  • Contain the 3 .aab artefacts (WP Alpha, WP Beta, JP Beta)
  • Be marked as "This is a pre-release"
Screenshot of the expected GitHub Release draft

Cleanup

  • Delete your ci-test/pr15319 branch from origin.
  • Delete the draft GitHub Release named 18.2-rc-999.

@AliSoftware AliSoftware self-assigned this Sep 13, 2021
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Sep 13, 2021

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Sep 13, 2021

You can test the changes on this Pull Request by downloading the APKs:

@AliSoftware AliSoftware force-pushed the jetpack-infra/unified-gh-release branch from a935dc6 to 4abbd21 Compare September 13, 2021 13:27
@AliSoftware AliSoftware force-pushed the jetpack-infra/unified-gh-release branch from 4abbd21 to d0f2c75 Compare September 13, 2021 14:32
@AliSoftware AliSoftware marked this pull request as ready for review September 13, 2021 14:49
@AliSoftware AliSoftware requested a review from a team September 13, 2021 14:49
@AliSoftware AliSoftware changed the title Jetpack infra/unified gh release [Tooling] Create a Single, Unified GitHub Releases for WP Alpha, WP Beta & JP Beta Sep 13, 2021
@AliSoftware AliSoftware added this to the 18.2 ❄️ milestone Sep 13, 2021
Copy link
Contributor

@mokagio mokagio left a comment

Choose a reason for hiding this comment

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

This is very neat. Blown away by the speed at which CI built. I went on the tab to check on the progress and it had already finished! 🤯

I verified the generated release matches the expectation 👌

Not sure what your plans for merging are. In case you haven't thought of it already, I'd suggest rewriting the history to drop the last two commits.

fastlane/Fastfile Outdated Show resolved Hide resolved
fastlane/Fastfile Outdated Show resolved Hide resolved
@AliSoftware
Copy link
Contributor Author

This is very neat. Blown away by the speed at which CI built. I went on the tab to check on the progress and it had already finished! 🤯

Yep, definitively! Having this project done (paaHJt-2s8-p2 + paaHJt-2s9-p2) will change my life as Release Manager!! I'm so happy for this change, no more spending the whole morning waiting for CI (and having to wait for WP CI to finish before I need to trigger JP CI) and no more having to do half of the tasks by hand anymore 🎉 #relief

Not sure what your plans for merging are. In case you haven't thought of it already, I'd suggest rewriting the history to drop the last two commits.

Yeah I did it that way because last time I used a debug commit like that, the PR was accidentally merged before we pushed back the revert commit, so I figured it was better to include the debug commit and its revert this time, and ask you to point before the revert commit.

That being said, I think I'll keep those 2 commits in the merge, because rewriting history to drop them would make the PR description invalid if I did, and it can still make sense to keep track on how the PR was tested. Not a big deal once the PR is merged you'd say, and I can also see the value in keeping the git history cleaner, but I still like to keep consistency in the PR comments and desc even post-merge, in case we need to come back to this PR later one day and need to make sense of it 🙃

fastlane/Fastfile Outdated Show resolved Hide resolved
@peril-wordpress-mobile
Copy link

Warnings
⚠️ This PR is assigned to a milestone which is closing in less than 4 days Please, make sure to get it merged by then or assign it to a later expiring milestone

Generated by 🚫 dangerJS

This has been replaced by the public `trigger_release_build` lane, which makes use of the `circleci_trigger_job` action implemented in toolkit.

The old `trigger_ci` lane was not used anywhere in the Fastfile anymore (and being a private lane, couldn't be invoked manually from CLI either), confirming it was not used anymore.
@AliSoftware AliSoftware merged commit 87dd0b3 into release/18.2 Sep 14, 2021
@AliSoftware AliSoftware deleted the jetpack-infra/unified-gh-release branch September 14, 2021 14:04
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.

2 participants