buildkite-builder 2.3.0 → 2.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: 2c6eaf580c5dea018a834cf11f76e5d1d1aa13792fda9b9d513993e53f56f0a7
4
- data.tar.gz: 5958862296476f8421ccb62fb0f23e7fef86302fdf354b00c8db9885f71691f0
3
+ metadata.gz: 4c4c2623f11f578f2839830abd97f02de9189aca48838b51af749a2ed63b5d43
4
+ data.tar.gz: 80ad9118885ca08b62b9d849f5bde06d60ab8ed13095921a4bf017c1b23754f1
5
5
  SHA512:
6
- metadata.gz: 42719a13b6515e91edd391ea18e3f3e18b8db49ec4e4b36d81d0388a701a7567c63992b72860c20f1041b378c6b7a5475c2f5c33a2e454886c3f8a8a678d0b75
7
- data.tar.gz: f19d241a0507f434f778560bb4bf5b10dacbe1f8e743718257ac235b433cffd69f472b4d8eb30f9b3ceb28401cb241bda022743a29ffa8f72449964b3a091fa2
6
+ metadata.gz: faf4b6d95c5ce06432dec04ddc53df0b6ca4a0e8e0986fe5798b02678513847f1bc1dc6cfa4e3a81d603d0aad5db55e6b7f7ece5f21801fb92e52ae8e6895d68
7
+ data.tar.gz: 8c134596ebac502f43c0da347dbe36f5db527534b50781623cd3ea0b2e69a8ff6ecb9bfc1cd9ec697b616bcfe7c3804bc728a9c6a70d5c71aecfc4d772fa9931
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 2.4.0
2
+ * Upload custom pipeline artifacts in a single command.
3
+ * Only upload the pipeline as an artifact when the pipeline upload fails.
4
+
1
5
  ## 2.3.0
2
6
  * Improve BKB step idempotency.
3
7
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.0
1
+ 2.4.0
@@ -51,10 +51,11 @@ module Buildkite
51
51
  file.sync = true
52
52
  file.write(contents)
53
53
 
54
- logger.info '+++ :paperclip: Uploading pipeline.yml as artifact'
55
- Buildkite::Pipelines::Command.artifact!(:upload, file.path)
56
- logger.info '+++ :pipeline: Uploading pipeline'
57
- Buildkite::Pipelines::Command.pipeline!(:upload, file.path)
54
+ logger.info "+++ :pipeline: Uploading pipeline"
55
+ unless Buildkite::Pipelines::Command.pipeline!(:upload, file.path)
56
+ logger.info "Pipeline upload failed, saving as artifact…"
57
+ Buildkite::Pipelines::Command.artifact!(:upload, file.path)
58
+ end
58
59
  logger.info "+++ :toolbox: Setting job meta-data to #{Buildkite.env.job_id.color(:yellow)}"
59
60
  Buildkite::Pipelines::Command.meta_data!(:set, Builder::META_DATA.fetch(:job), Buildkite.env.job_id)
60
61
  end
@@ -89,13 +90,8 @@ module Buildkite
89
90
  def upload_artifacts
90
91
  return if artifacts.empty?
91
92
 
92
- logger.info "+++ :paperclip: Uploading #{artifacts.size.to_s.color(:yellow)} artifact#{'s' if artifacts.size != 1}"
93
-
94
- artifacts.each do |path|
95
- if File.exist?(path)
96
- Buildkite::Pipelines::Command.artifact!(:upload, path)
97
- end
98
- end
93
+ logger.info "+++ :paperclip: Uploading artifacts"
94
+ Buildkite::Pipelines::Command.artifact!(:upload, artifacts.join(";"))
99
95
  end
100
96
 
101
97
  def pipeline_definition
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: 2.3.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ngan Pham
8
8
  - Andrew Lee
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2021-11-12 00:00:00.000000000 Z
12
+ date: 2022-01-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rainbow
@@ -181,7 +181,7 @@ metadata:
181
181
  source_code_uri: https://github.com/Gusto/buildkite-builder
182
182
  changelog_uri: https://github.com/Gusto/buildkite-builder/blob/master/CHANGELOG.md
183
183
  bug_tracker_uri: https://github.com/Gusto/buildkite-builder/issues
184
- post_install_message:
184
+ post_install_message:
185
185
  rdoc_options: []
186
186
  require_paths:
187
187
  - lib
@@ -196,8 +196,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
196
  - !ruby/object:Gem::Version
197
197
  version: '0'
198
198
  requirements: []
199
- rubygems_version: 3.1.6
200
- signing_key:
199
+ rubygems_version: 3.2.32
200
+ signing_key:
201
201
  specification_version: 4
202
202
  summary: A gem for programmatically creating Buildkite pipelines.
203
203
  test_files: []