buildkite-builder 4.2.1 → 4.2.3

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: 9a8781f1d4e933a20eae5cc484f9c7d8fe11e1606fb89981819d3b94c6b79622
4
- data.tar.gz: 9c48682aaed76cf3d72a25a6c8633395243b153c0cd3a7ea4d1310ac6776546d
3
+ metadata.gz: f78027cb639faf03eea36c6c84b8aea50025af24f1e5c09a389b5203e431d008
4
+ data.tar.gz: 5723079be24c95035c591ca9460a1bea6d2316fd587399ccd16b0fa829ae5116
5
5
  SHA512:
6
- metadata.gz: 45973c8d81a01fd188822260e62d60d2c2a5ed7cb6dde21d530d3a31c0327e4d065639934c82d7528a218505d902b67d1cfe11c1d088b61bff5ddbb3997a8a08
7
- data.tar.gz: 5a37e559b446888b8812ecca4a2fd3592138c6adbd6a3f56f82d80bd5b5adb6b64d411ac986b678c42e3537e7dab16c91b8e289f0171707d2d4f69da4aeaf4de
6
+ metadata.gz: 293dc52291c612d517d834c7a696c3d4d68ec51ea13269751ac3ff4efcc885c0a9fb2fb77e6838fa891c9cd746c2971e65f2ee0d728a2f849349552006ac62e2
7
+ data.tar.gz: ef28cb83020db6815f0f4fe8c6eafffd202a44e8f2f3907a8eebf20546448b4ba8cb57925bd0396b33b2dd624bb872afe50a86ad7935b47307b63a04e1db999c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ### 4.2.3
2
+ * Simplify pipeline upload duplication check
3
+
4
+ ### 4.2.2
5
+ * Use step id to distinguish different piplelines, fix re-uploading pipeline on same step issue.
6
+
1
7
  ### 4.2.1
2
8
  * Allow uploading pipeline to different jobs
3
9
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.2.1
1
+ 4.2.3
@@ -17,8 +17,8 @@ module Buildkite
17
17
  # variables to be set. It also uploads the pipeline to Buildkite.
18
18
  log.info "+++ 🧰 #{'Buildkite Builder'.color(:springgreen)} v#{Buildkite::Builder.version} ─ #{relative_pipeline_path.to_s.yellow}"
19
19
 
20
- if Buildkite::Pipelines::Command.meta_data(:get, Builder::META_DATA.fetch(:job)) == Buildkite.env.job_id
21
- log.info "Pipeline already uploaded in #{Buildkite.env.job_id}".color(:dimgray)
20
+ if Buildkite::Pipelines::Command.meta_data(:exists, Builder.meta_data.fetch(:job))
21
+ log.info "Pipeline already uploaded in #{Buildkite.env.step_id} step".color(:dimgray)
22
22
  else
23
23
  Pipeline.new(pipeline_path, logger: log).upload
24
24
  end
@@ -57,7 +57,7 @@ module Buildkite
57
57
  abort
58
58
  end
59
59
  logger.info "+++ :toolbox: Setting job meta-data to #{Buildkite.env.job_id.color(:yellow)}"
60
- Buildkite::Pipelines::Command.meta_data!(:set, Builder::META_DATA.fetch(:job), Buildkite.env.job_id)
60
+ Buildkite::Pipelines::Command.meta_data!(:set, Builder.meta_data.fetch(:job), Buildkite.env.step_id)
61
61
  end
62
62
  end
63
63
 
@@ -23,11 +23,14 @@ module Buildkite
23
23
  autoload :PluginManager, File.expand_path('builder/plugin_manager', __dir__)
24
24
 
25
25
  BUILDKITE_DIRECTORY_NAME = Pathname.new('.buildkite').freeze
26
- META_DATA = {
27
- job: 'buildkite-builder:job'
28
- }.freeze
29
26
 
30
27
  class << self
28
+ def meta_data
29
+ @meta_data ||= {
30
+ job: "buildkite-builder:#{Buildkite.env.step_id}"
31
+ }
32
+ end
33
+
31
34
  def root(start_path: Dir.pwd, reset: false)
32
35
  @root = nil if reset
33
36
  @root ||= find_buildkite_directory(start_path)
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: 4.2.1
4
+ version: 4.2.3
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: 2023-06-21 00:00:00.000000000 Z
12
+ date: 2023-06-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rainbow