buildkite-builder 1.0.0.beta.1 → 1.0.0.beta.2

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: c22fb54818a96418e345d04ef7e12a65763af08fe6250175d637d575ba2c583a
4
- data.tar.gz: 64c066a9f8c3911a19f07a4c17c757ba345298eee3520054dc87d14ed27fb792
3
+ metadata.gz: 2c8f87cd12b82cdfba170b75d353b119873c5ca8cb646424fe7fbcf3f544618a
4
+ data.tar.gz: 4ea661f51e29cea2310424aa09837d204b6fe7712768fba59ea52f1ffba61f44
5
5
  SHA512:
6
- metadata.gz: 9ae6894272a6a796b7e7a4b1cff2cad4022fa3c2219a685de70c4079964907964b7e5abf560b04eacbb8d9e1a6dbe703ed9eb4ed7e796bf4eb04a3c5a942b42b
7
- data.tar.gz: 27ed5cd611cdcb50957e40e48dfcc8f31b14001132db37c1edc6119f4c83241329561928703f49d4919be3ffa553617f693b765136730fc4c2d364ab6475f1c6
6
+ metadata.gz: 32237eff23a7ac011378218ef43603799123f26ecee7066c7bf89a4776b402d2b2e797ad0c7afe0d5390471abca1e0ce2b803bea2535a8e235e88650b8d19643
7
+ data.tar.gz: 678b1f9dd7d47020e7c2e3aeddd9e419a6aaba8e5a405eb4333d28834aebc558612f5b93bb4f660368c7374755b76daffb5065e9940af710cb6b2ece0095f1e2
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- buildkite-builder (1.0.0.beta.1)
4
+ buildkite-builder (1.0.0.beta.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -6,7 +6,7 @@ require 'pathname'
6
6
 
7
7
  module Buildkite
8
8
  module Builder
9
- VERSION = '1.0.0.beta.1'
9
+ VERSION = '1.0.0.beta.2'
10
10
 
11
11
  autoload :Commands, File.expand_path('builder/commands', __dir__)
12
12
  autoload :Definition, File.expand_path('builder/definition', __dir__)
@@ -4,6 +4,23 @@ module Buildkite
4
4
  module Pipelines
5
5
  module Helpers
6
6
  module SoftFail
7
+ def soft_fail(*value)
8
+ # soft_fail can be an array of exit_statuses or true
9
+ # https://buildkite.com/docs/pipelines/command-step#soft-fail-attributes
10
+
11
+ if value.first == true
12
+ current = get('soft_fail')
13
+
14
+ if current.is_a?(Array)
15
+ raise ArgumentError, "Cannot set soft_fail to true when it's already an array.\nsoft_fail: #{current}"
16
+ else
17
+ set('soft_fail', true)
18
+ end
19
+ else
20
+ super
21
+ end
22
+ end
23
+
7
24
  def soft_fail_on_status(*statuses)
8
25
  statuses.each do |status|
9
26
  soft_fail(exit_status: status)
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buildkite-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta.1
4
+ version: 1.0.0.beta.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ngan Pham
8
8
  - Andrew Lee
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-11-19 00:00:00.000000000 Z
12
+ date: 2020-11-24 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Write a longer description or delete this line.
15
15
  email:
@@ -104,7 +104,7 @@ metadata:
104
104
  source_code_uri: https://github.com/Gusto/buildkite-builder
105
105
  changelog_uri: https://github.com/Gusto/buildkite-builder/blob/master/CHANGELOG.md
106
106
  bug_tracker_uri: https://github.com/Gusto/buildkite-builder/issues
107
- post_install_message:
107
+ post_install_message:
108
108
  rdoc_options: []
109
109
  require_paths:
110
110
  - lib
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  version: 1.3.1
121
121
  requirements: []
122
122
  rubygems_version: 3.1.4
123
- signing_key:
123
+ signing_key:
124
124
  specification_version: 4
125
125
  summary: Write a short summary, because RubyGems requires one.
126
126
  test_files: []