buildkite-builder 3.3.2 → 3.4.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: 25e5b7c5ee30bb570f214b7061ecc8c9dee2e118e0116ddfe2cc3d070fb2bed5
4
- data.tar.gz: a9bad724efa96a3a613eb3c7e3e016c0697d9d4c6e66deba2e09d3056651aad9
3
+ metadata.gz: 2e74780f14a94f7db9cdac81ed2f28657f94dc9547d5b8bc54c10b7f8797c256
4
+ data.tar.gz: 0c2191c768092e804eb7b9623234d46c9c1496fdc8062bd5dcaf45a2de48c7a9
5
5
  SHA512:
6
- metadata.gz: 6e6758542d63fdfe9b824a5c47765f01ed8ed8aea0130da1249aa9e2f6c7b593ee4bde1ea69b92b897d1ef8e0f1a9df235dddd87a36b0c807496bfefc98ad993
7
- data.tar.gz: d91ce92070ebacf6b22477c6b16a353578d6c52231c20e6f21f45675ee9e21f889263aa4454b1c5173c069984ae34fbd1b16e9037fdb479ab7cf9447c3cf97e4
6
+ metadata.gz: 9632e4990ba1d48ea5231d256e8a9143a99ff3a6fdabc41635e71c3092a0a89a839359819a6feffdb0357f006f894d3d40235efd0ebece5d4e4bca85f3d59c64
7
+ data.tar.gz: bd5848e4a08412331d740aebacd0f9373009ca12427598943c7de630302a4ad7ab6f2907d790052e496433f8cd1463f7cc340212ef4dead044691bd5081f0657
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 3.4.0
2
+ * `automatically_retry(status:, limit:)` has been renamed to `automatic_retry_on(exit_status:, limit:)`
3
+ * Added `automatic_retry` for setting boolean for `retry.automatic`
4
+ * Added `manual_retry` for setting `retry.manual`
5
+
1
6
  ## 3.3.2
2
7
  * Fix subpipeline trigger step attributes leak to subpipeline.
3
8
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.3.2
1
+ 3.4.0
@@ -4,15 +4,26 @@ module Buildkite
4
4
  module Pipelines
5
5
  module Helpers
6
6
  module Retry
7
- def automatically_retry(status:, limit:)
8
- retry_value = get(:retry)&.[](:automatic)
7
+ def automatic_retry_on(exit_status:, limit:)
8
+ retry_value = get(:retry) || set(:retry, {})
9
9
 
10
- unless retry_value.is_a?(Array)
11
- retry_value = []
12
- self.retry(automatic: retry_value)
10
+ unless retry_value[:automatic].is_a?(Array)
11
+ retry_value[:automatic] = []
13
12
  end
14
13
 
15
- retry_value.push(exit_status: status, limit: limit)
14
+ retry_value[:automatic].push(exit_status: exit_status, limit: limit)
15
+ end
16
+
17
+ def automatic_retry(enabled)
18
+ retry_value = get(:retry) || set(:retry, {})
19
+ retry_value[:automatic] = enabled
20
+ end
21
+
22
+ def manual_retry(allowed, reason: nil, permit_on_passed: nil)
23
+ retry_value = get(:retry) || set(:retry, {})
24
+ retry_value[:manual] = { allowed: allowed }
25
+ retry_value[:manual][:reason] = reason unless reason.nil?
26
+ retry_value[:manual][:permit_on_passed] = permit_on_passed unless permit_on_passed.nil?
16
27
  end
17
28
  end
18
29
  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: 3.3.2
4
+ version: 3.4.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: 2022-08-22 00:00:00.000000000 Z
12
+ date: 2022-09-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rainbow
@@ -40,21 +40,7 @@ dependencies:
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
- name: byebug
44
- requirement: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - ">="
47
- - !ruby/object:Gem::Version
48
- version: '0'
49
- type: :development
50
- prerelease: false
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- version: '0'
56
- - !ruby/object:Gem::Dependency
57
- name: pry-byebug
43
+ name: debug
58
44
  requirement: !ruby/object:Gem::Requirement
59
45
  requirements:
60
46
  - - ">="
@@ -192,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
178
  - !ruby/object:Gem::Version
193
179
  version: '0'
194
180
  requirements: []
195
- rubygems_version: 3.3.13
181
+ rubygems_version: 3.2.32
196
182
  signing_key:
197
183
  specification_version: 4
198
184
  summary: A gem for programmatically creating Buildkite pipelines.