buildkite-builder 2.0.0 → 2.1.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 +13 -0
- data/README.md +1 -1
- data/VERSION +1 -1
- data/lib/buildkite/builder/extensions/steps.rb +6 -1
- data/lib/buildkite/builder/file_resolver.rb +1 -1
- data/lib/buildkite/builder/manifest/rule.rb +1 -1
- data/lib/buildkite/builder/manifest.rb +1 -2
- data/lib/buildkite/builder/pipeline.rb +3 -3
- data/lib/buildkite/builder/step_collection.rb +8 -0
- data/lib/buildkite/pipelines/command.rb +8 -0
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1796ef4fc73c74c399a7eb271092baee5b0101e3c06598c8d837d1fd031876e2
|
4
|
+
data.tar.gz: c384d20a194cf13a8dff4e1057a1b07b777201fd717f1d75496d88ec04d7fbff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc19aa8d8c3af6f4fbbd0bd892d56f41243649b8b384e38f7391d8e198950704bc515530c022c231eb7d4368a7bed0f74fa0f4bab3c020813bf045b67a4d1062
|
7
|
+
data.tar.gz: e414869940fbb417e06192a7fdd48049d38564c00f1283a8110c2521462ce736ec890c7275c03c386b619ae718b654a4ac2cbbf460cb1f1dfd86cefb4e871b2c
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
## 2.1.0
|
2
|
+
* Fix a bug introduced in 2.0.0 where artifacts were being uploaded before extensions had a chance to do work.
|
3
|
+
* Remove `SortedSet` dependency.
|
4
|
+
* Add `annotate` pipeline command helper.
|
5
|
+
* Add `StepCollection#find` and `StepCollection#find!` for ease of finding a step by its key in extensions.
|
6
|
+
* `group` now supports the `emoji:` helper. (Eg. `group "foobar", emoji: :smile`)
|
7
|
+
|
8
|
+
## 2.0.0
|
9
|
+
* Add support for `group`.
|
10
|
+
* `Processor`s has been renamed to `Extension`. Extensions add more capabilities (will document separately).
|
11
|
+
* `plugin` no longer takes 2 arguments (source, version). It's simply 1 arg that is both source and version, separated by a `#`. This is more akin to Buildkite's usage.
|
12
|
+
* Full refactor of pipeline code allowing for extensions to extend DSL methods.
|
13
|
+
|
1
14
|
## 1.5.0
|
2
15
|
* Merge `BuildKite::Builder::Context` and `BuildKite::Pipelines::Pipeline` to `BuildKite::Builder::Pipeline` (#37)
|
3
16
|
|
data/README.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.1.0
|
@@ -10,9 +10,14 @@ module Buildkite
|
|
10
10
|
end
|
11
11
|
|
12
12
|
dsl do
|
13
|
-
def group(label = nil, &block)
|
13
|
+
def group(label = nil, emoji: nil, &block)
|
14
14
|
raise "Group does not allow nested in another Group" if context.is_a?(Group)
|
15
15
|
|
16
|
+
if emoji
|
17
|
+
emoji = Array(emoji).map { |name| ":#{name}:" }.join
|
18
|
+
label = [emoji, label].compact.join(' ')
|
19
|
+
end
|
20
|
+
|
16
21
|
context.data.steps.push(Buildkite::Builder::Group.new(label, context.data.steps, &block))
|
17
22
|
end
|
18
23
|
|
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
require 'digest/md5'
|
4
4
|
require 'pathname'
|
5
|
-
require 'sorted_set'
|
6
5
|
|
7
6
|
module Buildkite
|
8
7
|
module Builder
|
@@ -56,7 +55,7 @@ module Buildkite
|
|
56
55
|
end
|
57
56
|
|
58
57
|
def files
|
59
|
-
@files ||= inclusion_rules.map(&:files).reduce(
|
58
|
+
@files ||= (inclusion_rules.map(&:files).reduce(Set.new, :merge) - exclusion_rules.map(&:files).reduce(Set.new, :merge)).sort.to_set
|
60
59
|
end
|
61
60
|
|
62
61
|
def digest
|
@@ -40,9 +40,6 @@ module Buildkite
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def upload
|
43
|
-
logger.info '+++ :paperclip: Uploading artifacts'
|
44
|
-
upload_artifacts
|
45
|
-
|
46
43
|
# Upload the pipeline.
|
47
44
|
Tempfile.create(['pipeline', '.yml']) do |file|
|
48
45
|
file.sync = true
|
@@ -53,6 +50,9 @@ module Buildkite
|
|
53
50
|
logger.info '+++ :pipeline: Uploading pipeline'
|
54
51
|
Buildkite::Pipelines::Command.pipeline!(:upload, file.path)
|
55
52
|
end
|
53
|
+
|
54
|
+
logger.info '+++ :paperclip: Uploading artifacts'
|
55
|
+
upload_artifacts
|
56
56
|
end
|
57
57
|
|
58
58
|
def to_h
|
@@ -27,6 +27,14 @@ module Buildkite
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
+
def find(key)
|
31
|
+
@steps.find { |step| step.has?(:key) && step.key == key.to_s }
|
32
|
+
end
|
33
|
+
|
34
|
+
def find!(key)
|
35
|
+
find(key) || raise(ArgumentError, "Can't find step with key: #{key}")
|
36
|
+
end
|
37
|
+
|
30
38
|
def add(step_class, template = nil, **args, &block)
|
31
39
|
@steps.push(step_class.new(self, template, **args, &block)).last
|
32
40
|
end
|
@@ -21,6 +21,14 @@ module Buildkite
|
|
21
21
|
new(:artifact, subcommand, *args).run
|
22
22
|
end
|
23
23
|
|
24
|
+
def self.annotate(body, *args)
|
25
|
+
new(:annotate, body, *args).run
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.annotate!(*args)
|
29
|
+
abort unless annotate(*args)
|
30
|
+
end
|
31
|
+
|
24
32
|
def initialize(command, subcommand, *args)
|
25
33
|
@command = command.to_s
|
26
34
|
@subcommand = subcommand.to_s
|
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: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ngan Pham
|
@@ -9,22 +9,8 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-08-
|
12
|
+
date: 2021-08-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: sorted_set
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
requirements:
|
18
|
-
- - ">="
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: '0'
|
21
|
-
type: :runtime
|
22
|
-
prerelease: false
|
23
|
-
version_requirements: !ruby/object:Gem::Requirement
|
24
|
-
requirements:
|
25
|
-
- - ">="
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
version: '0'
|
28
14
|
- !ruby/object:Gem::Dependency
|
29
15
|
name: rainbow
|
30
16
|
requirement: !ruby/object:Gem::Requirement
|