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] Use bot for release management git operations #14207

Merged
merged 7 commits into from
Nov 4, 2024

Conversation

iangmaia
Copy link
Contributor

@iangmaia iangmaia commented Oct 24, 2024

References

Android counterpart: woocommerce/woocommerce-android#11886
Original task describing the problem: https://github.com/Automattic/apps-infra-plans/issues/39
See paaHJt-6EP-p2 for more details.

What it does

This PR updates the release pipelines to use the use-bot-for-git script to use a bot account for git operations, avoiding the need for SSH deploy keys with write permission.

How to test

We'll fully run the release pipelines in the next release cycle once this is merged.

To test it, I've commented out a few side effects from start_code_freeze on e47032a and ran it directly on Buildkite (setting the env var PIPELINE=release-pipelines/start-code-freeze.yml) with this resulting build.

Dependencies

This PR targets #14225 (fixing issues with Xcode 16).

@iangmaia iangmaia added the category: tooling Anything that involves building & maintaining the project, including scripts, `Fastfile`, etc. label Oct 24, 2024
@iangmaia iangmaia self-assigned this Oct 24, 2024
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Oct 24, 2024

WooCommerce iOS📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS WooCommerce iOS
Build Numberpr14207-8731800
Version20.9
Bundle IDcom.automattic.alpha.woocommerce
Commit8731800
App Center BuildWooCommerce - Prototype Builds #11435
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@iangmaia iangmaia force-pushed the iangmaia/use-trusted-mac-agents-for-releases branch 6 times, most recently from 104e10e to e47032a Compare October 25, 2024 12:54
@iangmaia iangmaia marked this pull request as ready for review October 25, 2024 14:57
@iangmaia iangmaia added the status: do not merge Dependent on another PR, ready for review but not ready for merge. label Oct 25, 2024
@iangmaia iangmaia mentioned this pull request Oct 28, 2024
4 tasks
@iangmaia iangmaia force-pushed the iangmaia/use-trusted-mac-agents-for-releases branch from 92fe0db to 0986713 Compare October 28, 2024 17:40
@iangmaia iangmaia requested a review from a team as a code owner October 28, 2024 17:40
@iangmaia iangmaia changed the base branch from trunk to task/enable-xcode-16 October 28, 2024 17:41
@iangmaia iangmaia force-pushed the iangmaia/use-trusted-mac-agents-for-releases branch from 2ccb778 to 746167d Compare October 30, 2024 07:57
.buildkite/release-pipelines/complete-code-freeze.yml Outdated Show resolved Hide resolved
Comment on lines 17 to +21
echo '--- :git: Checkout Release Branch'
.buildkite/commands/checkout-release-branch.sh "$RELEASE_VERSION"

echo '--- :ruby: Setup Ruby Tools'
install_gems
Copy link
Contributor

Choose a reason for hiding this comment

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

By the way, I think this is the best approach to run bundle install. That is, we should always run it after checking out the release branch. Otherwise, we might run into the edge case of having the branch that triggered the build using a gemset different from the release branch which could lead to gnarly issues.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🎯

This is something I noticed in a lot of pipelines across our repos, that install_gems was running before checking out the new branch, so I've changed it with the use-bot-for-git change.

.buildkite/release-pipelines/finalize-hotfix-release.yml Outdated Show resolved Hide resolved
.buildkite/release-pipelines/finalize-release.yml Outdated Show resolved Hide resolved
.buildkite/release-pipelines/new-beta-release.yml Outdated Show resolved Hide resolved
.buildkite/release-pipelines/new-hotfix-release.yml Outdated Show resolved Hide resolved
.buildkite/release-pipelines/publish-release.yml Outdated Show resolved Hide resolved
.buildkite/release-pipelines/start-code-freeze.yml Outdated Show resolved Hide resolved
@iangmaia iangmaia removed the status: do not merge Dependent on another PR, ready for review but not ready for merge. label Oct 31, 2024
@staskus staskus force-pushed the task/enable-xcode-16 branch from fbcfd50 to b702c12 Compare November 4, 2024 06:50
Base automatically changed from task/enable-xcode-16 to trunk November 4, 2024 09:34
@staskus
Copy link
Collaborator

staskus commented Nov 4, 2024

@iangmaia Xcode 16.1 PR is merged.

@iangmaia iangmaia force-pushed the iangmaia/use-trusted-mac-agents-for-releases branch from 78843d3 to 8731800 Compare November 4, 2024 12:13
@iangmaia iangmaia enabled auto-merge November 4, 2024 12:13
@iangmaia iangmaia added this to the 21.1 milestone Nov 4, 2024
@iangmaia iangmaia merged commit 1e0d164 into trunk Nov 4, 2024
15 checks passed
@iangmaia iangmaia deleted the iangmaia/use-trusted-mac-agents-for-releases branch November 4, 2024 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: tooling Anything that involves building & maintaining the project, including scripts, `Fastfile`, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants