capistrano-nomad 0.10.3 → 0.10.4

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: 9e53ea71739d8bf0e6a35acc8fc6cf53b38793e2cb84406eabcbcae39eb3c95a
4
- data.tar.gz: 9acd6a38e395394f5b6fd2c29b7f79ff57ab4b5f03580b507131f4f14fa0e73c
3
+ metadata.gz: 44bb762da0b1f230e620bf5dded1c46fb791af7b3fa10bd55b8625bb378acf46
4
+ data.tar.gz: 3a9d575d16aeacd9cc6ffbd1b7c228eac10e8b158b8606da91afa8d10fe796ce
5
5
  SHA512:
6
- metadata.gz: b40e9dc02e6e447f20ba8f22c8c2916512b6d16204da16268f9156e5c48e77743adbacc51c06e0bb1df150bdf2d0fd2e9f6631ca1b2684830b76b72dfff06b9e
7
- data.tar.gz: a3a36894b7296ada17af461c3f61874f17c72be48f9307fc25b7b5e7940b6292a636249442f189fc38a8b966501bc45482202a3e7d9a5ddcf45d5bdd0e3b8078
6
+ metadata.gz: fb3ec9b2cb4977a3b0834f8ce7d856efaf74325d5079f086f29b06bb9a4658dfba067e137f32cf362d34884cce1d781ea688e40cb8a58d341c51dba477e23862
7
+ data.tar.gz: 1e4beb478de4f084f058b295aaeb08bf92cce4a03397ee1cdae2eb447a25c90804ac79baa758199c696a4479da928cfddc24680978854662d9d795315e32e3b3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capistrano-nomad (0.10.3)
4
+ capistrano-nomad (0.10.4)
5
5
  activesupport (<= 7.0.8)
6
6
  byebug
7
7
  capistrano (~> 3.0)
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "capistrano-nomad"
5
- spec.version = "0.10.3"
5
+ spec.version = "0.10.4"
6
6
  spec.authors = ["James Hu"]
7
7
 
8
8
  spec.summary = "Capistrano plugin for deploying and managing Nomad jobs"
@@ -135,14 +135,18 @@ end
135
135
  def capistrano_nomad_find_job_task_details(name, namespace: :default, task: nil)
136
136
  task = task.presence || name
137
137
 
138
- # Find alloc id that contains task
138
+ # Find alloc id that contains task that is also running
139
139
  allocs_output = capistrano_nomad_capture_nomad_command(
140
140
  :job,
141
141
  :allocs,
142
- { namespace: namespace, t: "'{{range .}}{{ .ID }},{{ .TaskGroup }}|{{end}}'" },
142
+ { namespace: namespace, t: "'{{range .}}{{ .ID }},{{ .ClientStatus }},{{ .TaskGroup }}|{{end}}'" },
143
143
  name,
144
144
  )
145
- alloc_id = allocs_output.split("|").map { |s| s.split(",") }.find { |_, t| t == task.to_s }&.first
145
+ alloc_id = allocs_output
146
+ .split("|")
147
+ .map { |s| s.split(",") }
148
+ .find { |_, s, t| s == "running" && t == task.to_s }
149
+ &.first
146
150
 
147
151
  # Can't continue if we can't choose an alloc id
148
152
  return unless alloc_id
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-nomad
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.3
4
+ version: 0.10.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Hu
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-28 00:00:00.000000000 Z
11
+ date: 2024-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport