buildkite-builder 4.18.0 → 4.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b35cda668c919aa133b9789085de5ecb4c285336b14613251b019df092a88cff
4
- data.tar.gz: 6a4a74637c721e677072e656872265c086d5f2dd969dd5396df57f5a7ac2f9dd
3
+ metadata.gz: 766b0ac1d07fc726b376e905fbfaa30864055c458bd0f3190247ec56a853768c
4
+ data.tar.gz: 4e79fe7cc6b1913afcd311ea96349242653f45ce0b541e7cb452dcb9e5366460
5
5
  SHA512:
6
- metadata.gz: 6e44c665a44cde92d9cf26cfc0735d95bedaa0c2acb547e48a39b17aaf4e5a941935013079fe15e239af084d183af1723841bcfe56b432b0acce6be2f02b9b53
7
- data.tar.gz: 54dd9bc5ce7e1d383e0f1223469e0a22a0418c0e8e74af3face8e1ac3fe386cabad78b3fec1bb01bbe7d66b3a3713e775562cb43f55b3697805ca2b85dbe017a
6
+ metadata.gz: 7313796c22a45884e1120ef293279f3473eb17da52e5c93bd71c5cc8c5514725fe0428ebe25a74b2adc728634bbeb256afc81e2625e2f4ae90d4f4ae4b7d92fc
7
+ data.tar.gz: 521ce5fdfeace7b5f23049cbf5e15df6a195f31d8aa7f71bbd856a2daa22a31ed9b5de405c5c330d1bb4b2696111c572d9bf3281dee72de403ee9ca7c365f51b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ### 4.19.0
2
+ * Support build matrix.
3
+
1
4
  ### 4.18.0
2
5
  * Support template definition within extensions.
3
6
 
data/README.md CHANGED
@@ -143,6 +143,61 @@ Buildkite::Builder.pipeline do
143
143
  end
144
144
  ```
145
145
 
146
+ ### Extensions
147
+
148
+ Extensions provide additional flexibility to run code and encapsulate reusable patterns in your pipelines. Think of extensions as Ruby modules that let you define custom DSL, step templates, and shared logic that can be used across multiple pipelines.
149
+
150
+ Extensions are useful when you want to standardize how certain steps are defined, or when you want to use or share complex logic (like deployment, notifications, or test orchestration).
151
+
152
+ `.buildkite/pipelines/foobar-widget/extensions/deploy_extension.rb`
153
+
154
+ ```ruby
155
+ class DeployExtension < Buildkite::Builder::Extension
156
+ dsl do
157
+ def deploy_step(&block)
158
+ command(:deploy, &block)
159
+ end
160
+ end
161
+ end
162
+ ```
163
+
164
+ `.buildkite/pipelines/foobar-widget/pipeline.rb`
165
+
166
+ ```ruby
167
+ Buildkite::Builder.pipeline do
168
+ deploy_step do
169
+ label "Deploy to production (EU)"
170
+ command "bundle exec deploy --env production --region eu"
171
+ end
172
+ end
173
+ ```
174
+
175
+ #### Extension Templates
176
+
177
+ Extensions can also provide multiple templates for different scenarios:
178
+
179
+ ```ruby
180
+ class TestExtension < Buildkite::Builder::Extension
181
+ template :default do
182
+ command "bundle exec rspec"
183
+ end
184
+
185
+ template :rubocop do
186
+ command "bundle exec rubocop"
187
+ end
188
+ end
189
+ ```
190
+
191
+ And used like this in the pipeline file:
192
+
193
+ ```ruby
194
+ command(TestExtension) # Uses the default template
195
+
196
+ command(TestExtension.template(:rubocop)) do
197
+ label "Custom Rubocop label"
198
+ end
199
+ ```
200
+
146
201
  ## Development
147
202
 
148
203
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.18.0
1
+ 4.19.0
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Buildkite
4
+ module Pipelines
5
+ module Helpers
6
+ module Matrix
7
+ def matrix(value = nil, setup: nil)
8
+ if value.nil? && setup.nil?
9
+ get(:matrix)
10
+ elsif setup
11
+ set(:matrix, { setup: setup })
12
+ else
13
+ set(:matrix, value)
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -9,6 +9,7 @@ module Buildkite
9
9
  depends_on: :DependsOn,
10
10
  key: :Key,
11
11
  label: :Label,
12
+ matrix: :Matrix,
12
13
  plugins: :Plugins,
13
14
  retry: :Retry,
14
15
  skip: :Skip,
@@ -14,6 +14,7 @@ module Buildkite
14
14
  attribute :depends_on, append: true
15
15
  attribute :allow_dependency_failure
16
16
  attribute :parallelism
17
+ attribute :matrix
17
18
  attribute :branches
18
19
  attribute :artifact_paths
19
20
  attribute :agents
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buildkite-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.18.0
4
+ version: 4.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ngan Pham
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2025-05-21 00:00:00.000000000 Z
12
+ date: 2025-07-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rainbow
@@ -154,6 +154,7 @@ files:
154
154
  - lib/buildkite/pipelines/helpers/depends_on.rb
155
155
  - lib/buildkite/pipelines/helpers/key.rb
156
156
  - lib/buildkite/pipelines/helpers/label.rb
157
+ - lib/buildkite/pipelines/helpers/matrix.rb
157
158
  - lib/buildkite/pipelines/helpers/plugins.rb
158
159
  - lib/buildkite/pipelines/helpers/retry.rb
159
160
  - lib/buildkite/pipelines/helpers/skip.rb