buildkite-builder 3.4.0 → 3.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/VERSION +1 -1
- data/lib/buildkite/builder/extensions/steps.rb +2 -2
- data/lib/buildkite/builder/plugin.rb +4 -4
- data/lib/buildkite/builder/plugin_collection.rb +5 -5
- data/lib/buildkite/builder/plugin_manager.rb +5 -2
- data/lib/buildkite/pipelines/helpers/plugins.rb +2 -2
- data/lib/buildkite/pipelines/helpers/retry.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64089d229e28dcf07061f4a32178cbf29fc157f2004e03adb84a800f24c2b8fd
|
4
|
+
data.tar.gz: d4faa31aac7205a07c29ef2766ae3067079d6d72ddb938adfdcec943babd564c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67c3325a7b86690c80d771a4cf7738718f1d072481cd23a2b21e9cd1bdb9c9a76b96fc35bb270d09c2ca1e69fbbd7e1d81c8b334a6973e4b148a27ebbf98c504
|
7
|
+
data.tar.gz: 7f4263163c198d8158fbc93e52dab34369ec51e5957860f4203d602ed6c7e445c018d8cf842584fafbfa2e9d44e0722e0ded99efb754d373bbff96f45bb676c2
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 3.5.0
|
2
|
+
* `plugin` registrations now takes an optional default attributes hash as the third argument.
|
3
|
+
|
4
|
+
## 3.4.1
|
5
|
+
* `automatic_retry_on` now overwrites rules with the same exit status.
|
6
|
+
|
1
7
|
## 3.4.0
|
2
8
|
* `automatically_retry(status:, limit:)` has been renamed to `automatic_retry_on(exit_status:, limit:)`
|
3
9
|
* Added `automatic_retry` for setting boolean for `retry.automatic`
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.5.0
|
@@ -21,8 +21,8 @@ module Buildkite
|
|
21
21
|
context.data.steps.push(Buildkite::Builder::Group.new(label, context.data.steps, &block))
|
22
22
|
end
|
23
23
|
|
24
|
-
def plugin(name, uri)
|
25
|
-
context.data.steps.plugins.add(name, uri)
|
24
|
+
def plugin(name, uri, default_attributes = {})
|
25
|
+
context.data.steps.plugins.add(name, uri, default_attributes)
|
26
26
|
end
|
27
27
|
|
28
28
|
def block(template = nil, **args, &block)
|
@@ -3,16 +3,16 @@
|
|
3
3
|
module Buildkite
|
4
4
|
module Builder
|
5
5
|
class Plugin
|
6
|
-
attr_reader :uri, :source, :version, :
|
6
|
+
attr_reader :uri, :source, :version, :attributes
|
7
7
|
|
8
|
-
def initialize(uri,
|
8
|
+
def initialize(uri, attributes = {})
|
9
9
|
@uri = uri
|
10
10
|
@source, @version = uri.split('#')
|
11
|
-
@
|
11
|
+
@attributes = attributes
|
12
12
|
end
|
13
13
|
|
14
14
|
def to_h
|
15
|
-
Buildkite::Pipelines::Helpers.sanitize(uri =>
|
15
|
+
Buildkite::Pipelines::Helpers.sanitize(uri => (attributes&.empty? ? nil : attributes))
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
@@ -8,17 +8,17 @@ module Buildkite
|
|
8
8
|
@collection = []
|
9
9
|
end
|
10
10
|
|
11
|
-
def add(resource,
|
11
|
+
def add(resource, attributes = {})
|
12
12
|
plugin =
|
13
13
|
case resource
|
14
14
|
when Symbol
|
15
|
-
|
15
|
+
registered_plugin = plugin_manager.fetch(resource.to_s)
|
16
16
|
|
17
|
-
raise ArgumentError, "Plugin `#{resource}` does not exist" unless
|
17
|
+
raise ArgumentError, "Plugin `#{resource}` does not exist" unless registered_plugin
|
18
18
|
|
19
|
-
Plugin.new(uri,
|
19
|
+
Plugin.new(registered_plugin[:uri], registered_plugin[:default_attributes].merge(attributes))
|
20
20
|
when String
|
21
|
-
Plugin.new(resource,
|
21
|
+
Plugin.new(resource, attributes)
|
22
22
|
when Plugin
|
23
23
|
resource
|
24
24
|
else
|
@@ -5,14 +5,17 @@ module Buildkite
|
|
5
5
|
@plugins = {}
|
6
6
|
end
|
7
7
|
|
8
|
-
def add(name, uri)
|
8
|
+
def add(name, uri, default_attributes = {})
|
9
9
|
name = name.to_s
|
10
10
|
|
11
11
|
if @plugins.key?(name)
|
12
12
|
raise ArgumentError, "Plugin already defined: #{name}"
|
13
13
|
end
|
14
14
|
|
15
|
-
@plugins[name] =
|
15
|
+
@plugins[name] = {
|
16
|
+
uri: uri,
|
17
|
+
default_attributes: default_attributes
|
18
|
+
}
|
16
19
|
end
|
17
20
|
|
18
21
|
def fetch(name)
|
@@ -4,9 +4,9 @@ module Buildkite
|
|
4
4
|
module Pipelines
|
5
5
|
module Helpers
|
6
6
|
module Plugins
|
7
|
-
def plugin(name_or_source,
|
7
|
+
def plugin(name_or_source, plugin_attributes = {})
|
8
8
|
attributes['plugins'] ||= Buildkite::Builder::PluginCollection.new(step_collection.plugins)
|
9
|
-
attributes['plugins'].add(name_or_source,
|
9
|
+
attributes['plugins'].add(name_or_source, plugin_attributes)
|
10
10
|
end
|
11
11
|
|
12
12
|
def plugins
|
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.
|
4
|
+
version: 3.5.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-
|
12
|
+
date: 2022-10-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rainbow
|
@@ -171,7 +171,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
171
171
|
requirements:
|
172
172
|
- - ">="
|
173
173
|
- !ruby/object:Gem::Version
|
174
|
-
version:
|
174
|
+
version: 3.0.0
|
175
175
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
176
|
requirements:
|
177
177
|
- - ">="
|