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 +4 -4
- data/Gemfile.lock +1 -1
- data/capistrano-nomad.gemspec +1 -1
- data/lib/capistrano/nomad/helpers/nomad.rb +7 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44bb762da0b1f230e620bf5dded1c46fb791af7b3fa10bd55b8625bb378acf46
|
4
|
+
data.tar.gz: 3a9d575d16aeacd9cc6ffbd1b7c228eac10e8b158b8606da91afa8d10fe796ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb3ec9b2cb4977a3b0834f8ce7d856efaf74325d5079f086f29b06bb9a4658dfba067e137f32cf362d34884cce1d781ea688e40cb8a58d341c51dba477e23862
|
7
|
+
data.tar.gz: 1e4beb478de4f084f058b295aaeb08bf92cce4a03397ee1cdae2eb447a25c90804ac79baa758199c696a4479da928cfddc24680978854662d9d795315e32e3b3
|
data/Gemfile.lock
CHANGED
data/capistrano-nomad.gemspec
CHANGED
@@ -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
|
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.
|
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-
|
11
|
+
date: 2024-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|