Skip to content

Commit 6a74513

Browse files
committed
Adopt shared pipeline vars for CI
1 parent 96adda9 commit 6a74513

File tree

3 files changed

+24
-17
lines changed

3 files changed

+24
-17
lines changed

.buildkite/pipeline.yml

+11-17
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
11
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
22
---
3-
# Nodes with values to reuse in the pipeline.
4-
common_params:
5-
env: &xcode_image
6-
IMAGE_ID: xcode-15.2
7-
plugins:
8-
- &ci_toolkit
9-
automattic/a8c-ci-toolkit#2.18.2: ~
10-
- &docker_plugin
11-
docker#v5.8.0:
12-
image: &ruby_version "public.ecr.aws/docker/library/ruby:3.2.2"
13-
propagate-environment: true
14-
environment:
15-
- "RUBYGEMS_API_KEY"
163

174
steps:
185
#################
@@ -39,14 +26,16 @@ steps:
3926
4027
echo "--- :rspec: Run Rspec"
4128
bundle exec rspec --profile 10 --format progress
42-
env: *xcode_image
43-
plugins: [*ci_toolkit]
29+
env:
30+
IMAGE_ID: $IMAGE_ID
31+
plugins:
32+
- $CI_TOOLKIT_PLUGIN
4433
agents:
4534
queue: "mac"
4635
matrix:
4736
setup:
4837
ruby:
49-
- 3.2.2
38+
- $RUBY_VERSION
5039

5140
#################
5241
# Push to RubyGems
@@ -60,6 +49,11 @@ steps:
6049
# commands written inline) to avoid leaking a key used in the process in clear in the
6150
# BUILDKITE_COMMAND environment variable.
6251
command: .buildkite/commands/gem-push.sh
63-
plugins: [*docker_plugin]
52+
plugins:
53+
- docker#v5.8.0:
54+
image: "public.ecr.aws/docker/library/ruby:$RUBY_VERSION"
55+
propagate-environment: true
56+
environment:
57+
- "RUBYGEMS_API_KEY"
6458
agents:
6559
queue: "default"

.buildkite/shared-pipeline-vars

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
CI_TOOLKIT_PLUGIN_VERSION="2.8.1"
7+
RUBY_VERSION=$(cat .ruby-version)
8+
XCODE_VERSION=$(sed 's/^~> *//' .xcode-version)
9+
10+
export CI_TOOLKIT_PLUGIN="automattic/a8c-ci-toolkit#$CI_TOOLKIT_PLUGIN_VERSION"
11+
export IMAGE_ID="xcode-$XCODE_VERSION"
12+
export RUBY_VERSION

.xcode-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
15.2

0 commit comments

Comments
 (0)