Skip to content

Commit

Permalink
Use shared vars in Buildkite pipilines and explicitly set mac queue
Browse files Browse the repository at this point in the history
  • Loading branch information
mokagio committed Jul 29, 2024
1 parent 28c7485 commit 1809295
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 27 deletions.
27 changes: 12 additions & 15 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
# Nodes with values to reuse in the pipeline.
common_params:
# Common plugin settings to use with the `plugins` key.
- &common_plugins
- automattic/a8c-ci-toolkit#3.1.0
# Common environment values to use with the `env` key.
- &common_env
IMAGE_ID: xcode-15.4

# This is the default pipeline – it will build and test the app

env:
IMAGE_ID: $IMAGE_ID

steps:
- label: "🔬 Build and Test"
command: .buildkite/commands/build-and-test.sh
env: *common_env
plugins: *common_plugins
plugins: [$CI_TOOLKIT_PLUGIN]
agents:
queue: mac

- label: ":swift: SwiftLint"
command: run_swiftlint --strict
plugins: *common_plugins
plugins: [$CI_TOOLKIT_PLUGIN]
notify:
- github_commit_status:
context: "SwiftLint"
agents:
queue: "default"
queue: default

- label: "🛠 Verify App Store Target Builds"
command: .buildkite/commands/build-and-test-app-store.sh
env: *common_env
plugins: *common_plugins
plugins: [$CI_TOOLKIT_PLUGIN]
agents:
queue: mac
17 changes: 5 additions & 12 deletions .buildkite/release-builds.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
# Nodes with values to reuse in the pipeline.
common_params:
# Common plugin settings to use with the `plugins` key.
- &common_plugins
- automattic/a8c-ci-toolkit#3.1.0
# Common environment values to use with the `env` key.
- &common_env
IMAGE_ID: xcode-15.4

# This is the default pipeline – it will build and test the app
steps:
- label: "🛠 App Store Upload"
command: .buildkite/commands/build-and-upload-release.sh
priority: 1
env: *common_env
plugins: *common_plugins
plugins: [$CI_TOOLKIT_PLUGIN]
agents:
queue: mac
env:
IMAGE_ID: $IMAGE_ID
11 changes: 11 additions & 0 deletions .buildkite/shared-pipeline-vars
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

# This file is `source`'d before calling `buildkite-agent pipeline upload`, and can be used
# to set up some variables that will be interpolated in the `.yml` pipeline before uploading it.

# The ~> modifier is not currently used, but we check for it just in case
XCODE_VERSION=$(sed -E -n 's/^(~> )?(.*)/xcode-\2/p' .xcode-version)
CI_TOOLKIT_PLUGIN_VERSION="3.4.2"

export IMAGE_ID="$XCODE_VERSION"
export CI_TOOLKIT_PLUGIN="automattic/a8c-ci-toolkit#$CI_TOOLKIT_PLUGIN_VERSION"
1 change: 1 addition & 0 deletions .xcode-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
15.4

0 comments on commit 1809295

Please sign in to comment.