buildkite-builder 3.2.0 → 3.3.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 +3 -0
- data/VERSION +1 -1
- data/lib/buildkite/builder/extensions/sub_pipelines.rb +30 -32
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2946cdcde9aa6a6474bb3f9464d77b5ac9831fe1c5f3a27e289017e215f711a4
|
4
|
+
data.tar.gz: 6cbc69d2ea605f0427577daf28ed0243f56ccb3b12338662c08d377774ac5177
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04b63489255060c1237b8c25094b0aba3e99fe08079d23ab13173392e36908bf9db798224b70e5c28dfaccbb9323dfd2c11c8e4446bad0a9fd6fd4d74b44de8a
|
7
|
+
data.tar.gz: b1685985083035299d690371891f05d16c0dc932b159551f1b1ae23d645c4764d63456f44d29ce72e97251ad38ac6229622ba7795d173f8acc72a1ad09e8756e
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.3.0
|
@@ -9,8 +9,15 @@ module Buildkite
|
|
9
9
|
|
10
10
|
attr_reader :data, :name, :dsl
|
11
11
|
|
12
|
-
|
12
|
+
# These attributes are for triggered step
|
13
|
+
attribute :label
|
13
14
|
attribute :key
|
15
|
+
attribute :skip
|
16
|
+
attribute :if, as: :condition
|
17
|
+
attribute :depends_on, append: true
|
18
|
+
attribute :allow_dependency_failure
|
19
|
+
attribute :branches
|
20
|
+
attribute :async
|
14
21
|
|
15
22
|
def self.to_sym
|
16
23
|
name.split('::').last.downcase.to_sym
|
@@ -60,44 +67,35 @@ module Buildkite
|
|
60
67
|
end
|
61
68
|
|
62
69
|
dsl do
|
63
|
-
def pipeline(name,
|
70
|
+
def pipeline(name, &block)
|
64
71
|
raise "Subpipeline must have a name" if name.empty?
|
65
72
|
raise "Subpipeline does not allow nested in another Subpipeline" if context.is_a?(Buildkite::Builder::Extensions::SubPipelines::Pipeline)
|
66
73
|
|
67
74
|
sub_pipeline = Buildkite::Builder::Extensions::SubPipelines::Pipeline.new(name, context, &block)
|
68
75
|
context.data.pipelines.add(sub_pipeline)
|
69
76
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
77
|
+
trigger_step = context.data.steps.add(Pipelines::Steps::Trigger)
|
78
|
+
trigger_step.trigger(name)
|
79
|
+
trigger_step.build(
|
80
|
+
message: '${BUILDKITE_MESSAGE}',
|
81
|
+
commit: '${BUILDKITE_COMMIT}',
|
82
|
+
branch: '${BUILDKITE_BRANCH}',
|
83
|
+
env: {
|
84
|
+
BUILDKITE_PULL_REQUEST: '${BUILDKITE_PULL_REQUEST}',
|
85
|
+
BUILDKITE_PULL_REQUEST_BASE_BRANCH: '${BUILDKITE_PULL_REQUEST_BASE_BRANCH}',
|
86
|
+
BUILDKITE_PULL_REQUEST_REPO: '${BUILDKITE_PULL_REQUEST_REPO}',
|
87
|
+
BKB_SUBPIPELINE_FILE: sub_pipeline.pipeline_yml
|
88
|
+
}
|
89
|
+
)
|
78
90
|
|
79
|
-
context.data.
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
env: {
|
88
|
-
BUILDKITE_PULL_REQUEST: '${BUILDKITE_PULL_REQUEST}',
|
89
|
-
BUILDKITE_PULL_REQUEST_BASE_BRANCH: '${BUILDKITE_PULL_REQUEST_BASE_BRANCH}',
|
90
|
-
BUILDKITE_PULL_REQUEST_REPO: '${BUILDKITE_PULL_REQUEST_REPO}',
|
91
|
-
BKB_SUBPIPELINE_FILE: sub_pipeline.pipeline_yml
|
92
|
-
}
|
93
|
-
)
|
94
|
-
async context[:async] || false
|
95
|
-
branches context[:branches] if context[:branches]
|
96
|
-
condition context[:condition] if context[:condition]
|
97
|
-
depends_on *context[:depends_on] if context[:depends_on]
|
98
|
-
allow_dependency_failure context[:allow_dependency_failure] || false
|
99
|
-
skip context[:skip] || false
|
100
|
-
end
|
91
|
+
trigger_step.key(sub_pipeline.key || "subpipeline_#{name}_#{context.data.pipelines.count}")
|
92
|
+
trigger_step.label(sub_pipeline.label || name.capitalize)
|
93
|
+
trigger_step.async(sub_pipeline.async || false)
|
94
|
+
trigger_step.branches(sub_pipeline.branches) if sub_pipeline.branches
|
95
|
+
trigger_step.condition(sub_pipeline.condition) if sub_pipeline.condition
|
96
|
+
trigger_step.depends_on(*sub_pipeline.get('depends_on')) if sub_pipeline.get('depends_on')
|
97
|
+
trigger_step.allow_dependency_failure(sub_pipeline.allow_dependency_failure || false)
|
98
|
+
trigger_step.skip(sub_pipeline.skip || false)
|
101
99
|
end
|
102
100
|
end
|
103
101
|
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.
|
4
|
+
version: 3.3.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-06-
|
12
|
+
date: 2022-06-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rainbow
|