buildkite-builder 4.2.0 → 4.2.2

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: 0de0ca71b799a2ae9a8e7c58a853ba4b77fef220b333f5f4d1d790e79c93af3e
4
- data.tar.gz: 633bd86958bc6155e30be2fcf62f1ca12b6c6d9c2eb96a5698f2dadaa020b036
3
+ metadata.gz: 368db189b191972229ed317ee1afda33c7827bead16c641324b34312a7e7dbcc
4
+ data.tar.gz: 552bec587cfae42895bd90467f9c3f558d11409c1db501f60144ebb590467b52
5
5
  SHA512:
6
- metadata.gz: 37ad92f7df9fa06f81423968c4c040cb629a39a7bf00cd48fc53bce1d8439f5c551cdbe80c9efba92954592dad696a957d144c4da26a9ba8b2c1747528672ff7
7
- data.tar.gz: e63a9f02c24f60f27e2bb23d71ee24543349f2a860810b4fb7e1a21e3b615fd96054acf72f04902632bccbd02274dc58cf5d225b5cac538693ed6d7439b7bced
6
+ metadata.gz: 8deb3a535a9dc881bd97a35bf71b0306b7ba4dc246dd5fc568e7c44f064f8e93e60cb50c2bda0c8438cacc462e1919ff3d53466b693d1b39bde7005df1fbc95d
7
+ data.tar.gz: 7f0d2e0d4a02f6f6ba99422c5215fea487adb6926d7300b7be447d37dd10fd9365c1be58864f9cc9816e03ee55c3c6e2d6d0293db344a4e9c0e3de0a76b41193
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ### 4.2.2
2
+ * Use step id to distinguish different piplelines, fix re-uploading pipeline on same step issue.
3
+
4
+ ### 4.2.1
5
+ * Allow uploading pipeline to different jobs
6
+
1
7
  ### 4.2.0
2
8
  * Add shared global templates
3
9
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.2.0
1
+ 4.2.2
@@ -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(:exists, Builder::META_DATA.fetch(:job))
21
- log.info 'Pipeline already uploaded'.color(:dimgray)
20
+ if Buildkite::Pipelines::Command.meta_data(:get, Builder.meta_data.fetch(:job)) == Buildkite.env.step_id
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.0
4
+ version: 4.2.2
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-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rainbow