Skip to content

Commit d6a9095

Browse files
committed
Use shared pipeline vars
This is a cherry-pick of a2ad0d5 (see #13855) on the release branch for 20.2 to ensure CI builds from this branch can function with the new CI backend configuration.
1 parent d3cae81 commit d6a9095

10 files changed

+102
-68
lines changed

.buildkite/pipeline.yml

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
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#3.3.0
6-
# Common environment values to use with the `env` key.
7-
- &common_env
8-
# Be sure to also update the `.xcode-version` file when updating the Xcode image/version here
9-
IMAGE_ID: xcode-15.4
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
2+
---
3+
4+
agents:
5+
queue: "mac"
6+
7+
env:
8+
IMAGE_ID: $IMAGE_ID
109

1110
# This is the default pipeline – it will build and test the app
1211
steps:
@@ -16,8 +15,7 @@ steps:
1615
- label: ":pipeline: Build"
1716
key: "build"
1817
command: ".buildkite/commands/build-for-testing.sh"
19-
env: *common_env
20-
plugins: *common_plugins
18+
plugins: [$CI_TOOLKIT]
2119
notify:
2220
- github_commit_status:
2321
context: "Build"
@@ -27,8 +25,7 @@ steps:
2725
#################
2826
- label: "🛠 Prototype Build"
2927
command: ".buildkite/commands/prototype-build.sh"
30-
env: *common_env
31-
plugins: *common_plugins
28+
plugins: [$CI_TOOLKIT]
3229
if: build.pull_request.id != null
3330
notify:
3431
- github_commit_status:
@@ -40,8 +37,7 @@ steps:
4037
- label: "🔬 Unit Tests"
4138
command: ".buildkite/commands/run-unit-tests.sh"
4239
depends_on: "build"
43-
env: *common_env
44-
plugins: *common_plugins
40+
plugins: [$CI_TOOLKIT]
4541
artifact_paths:
4642
- "fastlane/test_output/*"
4743
notify:
@@ -84,17 +80,15 @@ steps:
8480

8581
- label: ":sleuth_or_spy: Lint Localized Strings Format"
8682
command: .buildkite/commands/lint-localized-strings-format.sh
87-
plugins: *common_plugins
88-
env: *common_env
83+
plugins: [$CI_TOOLKIT]
8984

9085
#################
9186
# UI Tests
9287
#################
9388
- label: "🔬 UI Tests (iPhone)"
9489
command: .buildkite/commands/run-ui-tests.sh UITests 'iPhone 15'
9590
depends_on: "build"
96-
env: *common_env
97-
plugins: *common_plugins
91+
plugins: [$CI_TOOLKIT]
9892
artifact_paths:
9993
- "fastlane/test_output/*"
10094
notify:
@@ -104,8 +98,7 @@ steps:
10498
- label: "🔬 UI Tests (iPad)"
10599
command: .buildkite/commands/run-ui-tests.sh UITests "iPad (10th generation)"
106100
depends_on: "build"
107-
env: *common_env
108-
plugins: *common_plugins
101+
plugins: [$CI_TOOLKIT]
109102
artifact_paths:
110103
- "fastlane/test_output/*"
111104
notify:

.buildkite/release-builds.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
2+
---
3+
14
# This pipeline is meant to be run via the Buildkite API, and is only used for release builds
25

3-
# Nodes with values to reuse in the pipeline.
4-
common_params:
5-
# Common plugin settings to use with the `plugins` key.
6-
- &common_plugins
7-
- automattic/a8c-ci-toolkit#3.0.1
8-
# Common environment values to use with the `env` key.
9-
- &common_env
10-
# Be sure to also update the `.xcode-version` file when updating the Xcode image/version here
11-
IMAGE_ID: xcode-15.4
6+
agents:
7+
queue: "mac"
128

13-
steps:
9+
env:
10+
IMAGE_ID: $IMAGE_ID
1411

12+
steps:
1513
- label: "🛠 Release Build (App Store Connect)"
1614
command: ".buildkite/commands/release-build.sh ${BUILDKITE_BETA_RELEASE}"
1715
priority: 1
18-
env: *common_env
19-
plugins: *common_plugins
16+
plugins: [$CI_TOOLKIT]
2017
notify:
2118
- slack: "#build-and-ship"
2219
retry:

.buildkite/release-pipelines/complete-code-freeze.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
2+
---
3+
4+
agents:
5+
queue: "mac"
6+
7+
env:
8+
IMAGE_ID: $IMAGE_ID
9+
110
steps:
211
- label: "Complete Code Freeze"
3-
plugins:
4-
- automattic/a8c-ci-toolkit#3.0.1
5-
env:
6-
# Be sure to also update the `.xcode-version` file when updating the Xcode image/version here
7-
IMAGE_ID: xcode-15.4
12+
plugins: [$CI_TOOLKIT]
813
command: |
914
.buildkite/commands/configure-environment.sh
1015

.buildkite/release-pipelines/finalize-hotfix-release.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
2+
---
3+
4+
agents:
5+
queue: "mac"
6+
7+
env:
8+
IMAGE_ID: $IMAGE_ID
9+
110
steps:
211
- label: "Finalize Hotfix Release"
3-
plugins:
4-
- automattic/a8c-ci-toolkit#3.0.1
5-
env:
6-
# Be sure to also update the `.xcode-version` file when updating the Xcode image/version here
7-
IMAGE_ID: xcode-15.4
12+
plugins: [$CI_TOOLKIT]
813
command: |
914
.buildkite/commands/configure-environment.sh
1015

.buildkite/release-pipelines/finalize-release.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
2+
---
3+
4+
agents:
5+
queue: "mac"
6+
7+
env:
8+
IMAGE_ID: $IMAGE_ID
9+
110
steps:
211
- label: "Finalize Release"
3-
plugins:
4-
- automattic/a8c-ci-toolkit#3.0.1
5-
env:
6-
# Be sure to also update the `.xcode-version` file when updating the Xcode image/version here
7-
IMAGE_ID: xcode-15.4
12+
plugins: [$CI_TOOLKIT]
813
command: |
914
.buildkite/commands/configure-environment.sh
1015

.buildkite/release-pipelines/new-beta-release.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
2+
---
3+
4+
agents:
5+
queue: "mac"
6+
7+
env:
8+
IMAGE_ID: $IMAGE_ID
9+
110
steps:
211
- label: "New Beta Release"
3-
plugins:
4-
- automattic/a8c-ci-toolkit#3.0.1
5-
env:
6-
# Be sure to also update the `.xcode-version` file when updating the Xcode image/version here
7-
IMAGE_ID: xcode-15.4
12+
plugins: [$CI_TOOLKIT]
813
command: |
914
.buildkite/commands/configure-environment.sh
1015

.buildkite/release-pipelines/new-hotfix-release.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
2+
---
3+
4+
agents:
5+
queue: "mac"
6+
7+
env:
8+
IMAGE_ID: $IMAGE_ID
9+
110
steps:
211
- label: "New Hotfix Release"
3-
plugins:
4-
- automattic/a8c-ci-toolkit#3.0.1
5-
env:
6-
# Be sure to also update the `.xcode-version` file when updating the Xcode image/version here
7-
IMAGE_ID: xcode-15.4
12+
plugins: [$CI_TOOLKIT]
813
command: |
914
.buildkite/commands/configure-environment.sh
1015

.buildkite/release-pipelines/start-code-freeze.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
2+
---
3+
4+
agents:
5+
queue: "mac"
6+
7+
env:
8+
IMAGE_ID: $IMAGE_ID
9+
110
steps:
211
- label: "Start Code Freeze"
3-
plugins:
4-
- automattic/a8c-ci-toolkit#3.0.1
5-
env:
6-
# Be sure to also update the `.xcode-version` file when updating the Xcode image/version here
7-
IMAGE_ID: xcode-15.4
12+
plugins: [$CI_TOOLKIT]
813
command: |
914
.buildkite/commands/configure-environment.sh
1015

.buildkite/release-pipelines/update-metadata-on-app-store-connect.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
2+
---
3+
4+
agents:
5+
queue: "mac"
6+
7+
env:
8+
IMAGE_ID: $IMAGE_ID
9+
110
steps:
211
- label: "Update Metadata on App Store Connect"
3-
plugins:
4-
- automattic/a8c-ci-toolkit#3.0.1
5-
env:
6-
# Be sure to also update the `.xcode-version` file when updating the Xcode image/version here
7-
IMAGE_ID: xcode-15.4
12+
plugins: [$CI_TOOLKIT]
813
command: |
914
.buildkite/commands/configure-environment.sh
1015

.buildkite/shared-pipeline-vars

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
3+
# This file is `source`'d before calling `buildkite-agent pipeline upload`, and can be used
4+
# to set up some variables that will be interpolated in the `.yml` pipeline before uploading it.
5+
6+
XCODE_VERSION=$(sed -E -n 's/^(~> )?(.*)/xcode-\2/p' .xcode-version)
7+
export IMAGE_ID="$XCODE_VERSION"
8+
9+
export CI_TOOLKIT="automattic/a8c-ci-toolkit#3.5.1"

0 commit comments

Comments
 (0)