Skip to content

Commit fbc44e5

Browse files
authored
Merge pull request #18398 from wordpress-mobile/release-management-in-ci
Release management in CI
2 parents e6a52bb + 0af7b97 commit fbc44e5

18 files changed

+265
-35
lines changed

.buildkite/beta-builds.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
common_params:
66
# Common plugin settings to use with the `plugins` key.
77
- &common_plugins
8-
- automattic/a8c-ci-toolkit#2.15.0
8+
- automattic/a8c-ci-toolkit#2.15.1
99

1010
steps:
1111
#################

.buildkite/code-freeze.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Nodes with values to reuse in the pipeline.
2+
common_params:
3+
# Common plugin settings to use with the `plugins` key.
4+
- &common_plugins
5+
- automattic/a8c-ci-toolkit#2.15.1
6+
7+
steps:
8+
- label: "Code Freeze"
9+
plugins: *common_plugins
10+
command: |
11+
.buildkite/commands/configure-git-for-release-management.sh
12+
13+
install_gems
14+
15+
bundle exec fastlane code_freeze skip_confirm:true
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash -eu
2+
3+
# EDITORIAL_BRANCH is passed as an environment variable from fastlane to Buildkite
4+
#
5+
if [[ -z "${EDITORIAL_BRANCH}" ]]; then
6+
echo "EDITORIAL_BRANCH is not set."
7+
exit 1
8+
fi
9+
10+
# RELEASE_VERSION is passed as an environment variable from fastlane to Buildkite
11+
# Even though RELEASE_VERSION is not directly used in this script, it's necessary to update
12+
# the app store strings. Having this check here keeps the buildkite pipeline cleaner. Later on,
13+
# if we don't want it here, we can move it to a separate script file.
14+
if [[ -z "${RELEASE_VERSION}" ]]; then
15+
echo "RELEASE_VERSION is not set."
16+
exit 1
17+
fi
18+
19+
# Buildkite, by default, checks out a specific commit. When we update the app store strings, we open
20+
# a PR from the current branch. So, we need to checkout the `EDITORIAL_BRANCH`.
21+
git fetch origin "$EDITORIAL_BRANCH"
22+
git checkout "$EDITORIAL_BRANCH"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash -eu
2+
3+
# RELEASE_VERSION is passed as an environment variable from fastlane to Buildkite
4+
#
5+
if [[ -z "${RELEASE_VERSION}" ]]; then
6+
echo "RELEASE_VERSION is not set."
7+
exit 1
8+
fi
9+
10+
# Buildkite, by default, checks out a specific commit. For many release actions, we need to be
11+
# on a release branch instead.
12+
BRANCH_NAME="release/${RELEASE_VERSION}"
13+
git fetch origin "$BRANCH_NAME"
14+
git checkout "$BRANCH_NAME"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash -eu
2+
3+
# Git command line client is not configured in Buildkite. Temporarily, we configure it in each step.
4+
# Later on, we should be able to configure the agent instead.
5+
curl -L https://api.github.com/meta | jq -r '.ssh_keys | .[]' | sed -e 's/^/github.com /' >> ~/.ssh/known_hosts
6+
git config --global user.email "mobile+wpmobilebot@automattic.com"
7+
git config --global user.name "Automattic Release Bot"
8+
9+
# Buildkite is currently using the https url to checkout. We need to override it to be able to use the deploy key.
10+
git remote set-url origin git@github.com:wordpress-mobile/WordPress-Android.git

.buildkite/complete-code-freeze.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Nodes with values to reuse in the pipeline.
2+
common_params:
3+
# Common plugin settings to use with the `plugins` key.
4+
- &common_plugins
5+
- automattic/a8c-ci-toolkit#2.15.1
6+
7+
steps:
8+
- label: "Complete Code Freeze"
9+
plugins: *common_plugins
10+
command: |
11+
.buildkite/commands/configure-git-for-release-management.sh
12+
.buildkite/commands/checkout-release-branch.sh
13+
14+
install_gems
15+
16+
bundle exec fastlane complete_code_freeze skip_confirm:true

.buildkite/finalize-release.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Nodes with values to reuse in the pipeline.
2+
common_params:
3+
# Common plugin settings to use with the `plugins` key.
4+
- &common_plugins
5+
- automattic/a8c-ci-toolkit#2.15.1
6+
7+
steps:
8+
- label: "Finalize release"
9+
plugins: *common_plugins
10+
command: |
11+
.buildkite/commands/configure-git-for-release-management.sh
12+
.buildkite/commands/checkout-release-branch.sh
13+
14+
install_gems
15+
16+
bundle exec fastlane finalize_release skip_confirm:true

.buildkite/new-beta-release.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Nodes with values to reuse in the pipeline.
2+
common_params:
3+
# Common plugin settings to use with the `plugins` key.
4+
- &common_plugins
5+
- automattic/a8c-ci-toolkit#2.15.1
6+
7+
steps:
8+
- label: "New Beta Release"
9+
plugins: *common_plugins
10+
command: |
11+
.buildkite/commands/configure-git-for-release-management.sh
12+
13+
install_gems
14+
15+
bundle exec fastlane new_beta_release skip_confirm:true

.buildkite/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
common_params:
33
# Common plugin settings to use with the `plugins` key.
44
- &common_plugins
5-
- automattic/a8c-ci-toolkit#2.14.0
5+
- automattic/a8c-ci-toolkit#2.15.1
66

77
steps:
88
#################

.buildkite/release-builds.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
common_params:
66
# Common plugin settings to use with the `plugins` key.
77
- &common_plugins
8-
- automattic/a8c-ci-toolkit#2.14.0
8+
- automattic/a8c-ci-toolkit#2.15.1
99

1010
steps:
1111
#################

0 commit comments

Comments
 (0)