buildkite-builder 4.9.0 → 4.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1988a7d75f12a3ba418f77ff10242c54c1b2935d0f505a5dd93481cb74c844a1
4
- data.tar.gz: 611616f2f5956f372fb339b2e648fcdba2b618377e6611271ca661de53ebea93
3
+ metadata.gz: 16971fd66d90b28ddc6242ac41275185d63ecc496c79b4f5af13474c1a6419b2
4
+ data.tar.gz: fbb56291ff4451358b61a4fdb3f4179f56927a52257191282cbeed5a1677f4ae
5
5
  SHA512:
6
- metadata.gz: a8d237128b510bb3421a85bbb5a8d213c456309a115d3fb22efa6baf3cfa576da89a027a31390e1d6c105182625e3fd784f1d0b89a0ca99b9500c7a37ce8fb8f
7
- data.tar.gz: 748ff99e9c00f6975d42be4e69c6523cb7165b21df1ae28fbb8bcd7e38a52d151ab345b21a126f41dedeb2b07d5d81874037a7146bdc6f962a6a9b478f0cae1e
6
+ metadata.gz: 80f48524307f8b7de0160c1c7a8c8f3f93aee430bc73bf8c75ad81719342b7fff76f1d37e3b352b58f06c74f32d2e50fba38ee9f4d961373fbf0ad3aeedb1bb3
7
+ data.tar.gz: eab2a8c7aad231f58a66964058b39b08347018cb24dcb9aa6d6368cf657c673c94bb00653ba4bb89a4f53c918284200db0c6c196c449acceb5d32061c626e222
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### 4.11.0
2
+ * Allow skipping group traversal for StepCollection#each.
3
+
4
+ ### 4.10.0
5
+ * Update Buildkite pipelines to use Ruby 3.3 (#116)
6
+ * Add priority field on command steps (#117)
7
+ * Allow setting pipeline-wide agent settings (#118)
8
+
1
9
  ### 4.9.0
2
10
  * Upgrade to Ruby 3.3 for docker distribution.
3
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.9.0
1
+ 4.11.0
@@ -0,0 +1,21 @@
1
+ module Buildkite
2
+ module Builder
3
+ module Extensions
4
+ class Agents < Extension
5
+ def prepare
6
+ context.data.agents = {}
7
+ end
8
+
9
+ dsl do
10
+ def agents(*args)
11
+ if args.first.is_a?(Hash)
12
+ context.data.agents.merge!(args.first.transform_keys(&:to_s))
13
+ else
14
+ raise ArgumentError, 'value must be hash'
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -3,6 +3,7 @@
3
3
  module Buildkite
4
4
  module Builder
5
5
  module Extensions
6
+ autoload :Agents, File.expand_path('extensions/agents', __dir__)
6
7
  autoload :Env, File.expand_path('extensions/env', __dir__)
7
8
  autoload :Lib, File.expand_path('extensions/lib', __dir__)
8
9
  autoload :Notify, File.expand_path('extensions/notify', __dir__)
@@ -37,6 +37,7 @@ module Buildkite
37
37
  use(Extensions::Notify)
38
38
  use(Extensions::Steps)
39
39
  use(Extensions::Plugins)
40
+ use(Extensions::Agents)
40
41
  end
41
42
 
42
43
  def upload
@@ -16,7 +16,7 @@ module Buildkite
16
16
  @steps = []
17
17
  end
18
18
 
19
- def each(*types, &block)
19
+ def each(*types, traverse_groups: true, &block)
20
20
  types = types.flatten
21
21
  types.map! { |type| STEP_TYPES.values.include?(type) ? type : STEP_TYPES.fetch(type) }
22
22
  types = STEP_TYPES.values if types.empty?
@@ -25,7 +25,7 @@ module Buildkite
25
25
  if types.any? { |step_type| step.is_a?(step_type) }
26
26
  matches << step
27
27
  end
28
- if step.is_a?(Pipelines::Steps::Group)
28
+ if step.is_a?(Pipelines::Steps::Group) && traverse_groups
29
29
  step.steps.each(types) { |step| matches << step }
30
30
  end
31
31
  end
@@ -24,6 +24,7 @@ module Buildkite
24
24
  attribute :soft_fail, append: true
25
25
  attribute :timeout_in_minutes
26
26
  attribute :plugins, append: true
27
+ attribute :priority
27
28
  end
28
29
  end
29
30
  end
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.9.0
4
+ version: 4.11.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: 2024-05-17 00:00:00.000000000 Z
12
+ date: 2024-09-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rainbow
@@ -110,6 +110,7 @@ files:
110
110
  - lib/buildkite/builder/extension.rb
111
111
  - lib/buildkite/builder/extension_manager.rb
112
112
  - lib/buildkite/builder/extensions.rb
113
+ - lib/buildkite/builder/extensions/agents.rb
113
114
  - lib/buildkite/builder/extensions/env.rb
114
115
  - lib/buildkite/builder/extensions/lib.rb
115
116
  - lib/buildkite/builder/extensions/notify.rb
@@ -174,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
175
  - !ruby/object:Gem::Version
175
176
  version: '0'
176
177
  requirements: []
177
- rubygems_version: 3.5.9
178
+ rubygems_version: 3.5.0
178
179
  signing_key:
179
180
  specification_version: 4
180
181
  summary: A gem for programmatically creating Buildkite pipelines.