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 #1666

Merged
merged 6 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
#!/bin/bash -eu

if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
echo "This script must be 'source'd (instead of being called directly as an executable) to work properly"
exit 1
fi

# The Git command line client is not configured in Buildkite.
# At the moment, steps that need Git access can configure it on deman using this script.
# At the moment, steps that need Git access can configure it on demand using this script.
# Later on, we should be able to configure it on the agent instead.
add_host_to_ssh_known_hosts github.com
git config --global user.email "[email protected]"
git config --global user.name "Automattic Release Bot"

echo '--- :robot_face: Use bot for git operations'
source use-bot-for-git
2 changes: 1 addition & 1 deletion .buildkite/release-pipelines/complete-code-freeze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ steps:
plugins: [$CI_TOOLKIT_PLUGIN]
command: |
echo '--- :git: Configure Git for Release Management'
.buildkite/commands/configure-git-for-release-management.sh
source .buildkite/commands/configure-for-release.sh

echo '--- :git: Checkout release branch'
.buildkite/commands/checkout-release-branch.sh
Expand Down
8 changes: 5 additions & 3 deletions .buildkite/release-pipelines/new-beta-release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
---

agents:
queue: mac
# Variables used in this pipeline are defined in `shared-pipeline-vars`, which is `source`'d before calling `buildkite-agent pipeline upload`

# The new beta workflow needs to run on macOS because it uses SwiftGen under the hood.
#
Expand All @@ -11,12 +10,15 @@ agents:
env:
IMAGE_ID: $IMAGE_ID

agents:
queue: mac

steps:
- label: New Beta Release
plugins: [$CI_TOOLKIT_PLUGIN]
command: |
echo '--- :git: Configure Git for Release Management'
.buildkite/commands/configure-git-for-release-management.sh
source .buildkite/commands/configure-for-release.sh

echo '--- :git: Checkout Release Branch'
.buildkite/commands/checkout-release-branch.sh
Expand Down
12 changes: 8 additions & 4 deletions .buildkite/release-pipelines/start-code-freeze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@

# Variables used in this pipeline are defined in `shared-pipeline-vars`, which is `source`'d before calling `buildkite-agent pipeline upload`

env:
IMAGE_ID: $IMAGE_ID

agents:
queue: mac

steps:
- label: Start Code Freeze
plugins:
- $CI_TOOLKIT_PLUGIN
agents:
queue: tumblr-metal
command: |
echo '--- :robot_face: Use bot for Git operations'
source use-bot-for-git wpmobilebot
echo '--- :git: Configure Git for Release Management'
source .buildkite/commands/configure-for-release.sh

echo '--- :ruby: Setup Ruby Tools'
install_gems
Expand Down
2 changes: 1 addition & 1 deletion .xcode-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
15.4
16.1-rc.1