-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a bot user in a trusted agent for pipelines that require git push…
… operations
- Loading branch information
Showing
6 changed files
with
23 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json | ||
--- | ||
|
||
agents: | ||
queue: "android" | ||
|
||
steps: | ||
- label: "Code Freeze" | ||
plugins: [$CI_TOOLKIT] | ||
command: | | ||
.buildkite/commands/configure-git-for-release-management.sh | ||
source .buildkite/commands/configure-git-for-release-management.sh | ||
install_gems | ||
bundle exec fastlane code_freeze skip_confirm:true | ||
agents: | ||
queue: "tumblr-metal" |
15 changes: 8 additions & 7 deletions
15
.buildkite/commands/configure-git-for-release-management.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
#!/bin/bash -eu | ||
|
||
# Git command line client is not configured in Buildkite. Temporarily, we configure it in each step. | ||
# Later on, we should be able to configure the agent instead. | ||
curl -L https://api.github.com/meta | jq -r '.ssh_keys | .[]' | sed -e 's/^/github.com /' >> ~/.ssh/known_hosts | ||
git config --global user.email "mobile+wpmobilebot@automattic.com" | ||
git config --global user.name "Automattic Release Bot" | ||
# This script needs to be source'd as use-bot-for-git exports a variable and this needs to be visible outside | ||
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 | ||
|
||
# Buildkite is currently using the https url to checkout. We need to override it to be able to use the deploy key. | ||
git remote set-url origin git@github.com:wordpress-mobile/WordPress-Android.git | ||
echo '--- :robot_face: Use bot for git operations' | ||
# shellcheck disable=SC1091 | ||
source use-bot-for-git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json | ||
--- | ||
|
||
agents: | ||
queue: "android" | ||
|
||
steps: | ||
- label: "Complete Code Freeze" | ||
plugins: [$CI_TOOLKIT] | ||
command: | | ||
.buildkite/commands/configure-git-for-release-management.sh | ||
source .buildkite/commands/configure-git-for-release-management.sh | ||
.buildkite/commands/checkout-release-branch.sh | ||
install_gems | ||
bundle exec fastlane complete_code_freeze skip_confirm:true | ||
agents: | ||
queue: "tumblr-metal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json | ||
--- | ||
|
||
agents: | ||
queue: "android" | ||
|
||
steps: | ||
- label: "Finalize release" | ||
plugins: [$CI_TOOLKIT] | ||
command: | | ||
.buildkite/commands/configure-git-for-release-management.sh | ||
source .buildkite/commands/configure-git-for-release-management.sh | ||
.buildkite/commands/checkout-release-branch.sh | ||
install_gems | ||
cp gradle.properties-example gradle.properties | ||
bundle exec fastlane finalize_release skip_confirm:true | ||
agents: | ||
queue: "tumblr-metal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json | ||
--- | ||
|
||
agents: | ||
queue: "android" | ||
|
||
steps: | ||
- label: "New Beta Release" | ||
plugins: [$CI_TOOLKIT] | ||
command: | | ||
.buildkite/commands/configure-git-for-release-management.sh | ||
source .buildkite/commands/configure-git-for-release-management.sh | ||
install_gems | ||
cp gradle.properties-example gradle.properties | ||
bundle exec fastlane new_beta_release skip_confirm:true | ||
agents: | ||
queue: "tumblr-metal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json | ||
--- | ||
|
||
agents: | ||
queue: "android" | ||
|
||
steps: | ||
- label: "Update release notes" | ||
plugins: [$CI_TOOLKIT] | ||
command: | | ||
.buildkite/commands/configure-git-for-release-management.sh | ||
source .buildkite/commands/configure-git-for-release-management.sh | ||
.buildkite/commands/checkout-editorial-branch.sh | ||
install_gems | ||
bundle exec fastlane update_appstore_strings version:${RELEASE_VERSION} | ||
agents: | ||
queue: "tumblr-metal" |