capistrano-nomad 0.16.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/capistrano-nomad.gemspec +1 -1
- data/lib/capistrano/nomad/helpers/nomad.rb +16 -5
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 137c81e55b24eb37ce7b3e39722c378d2addea5c5b331ceadeb6d5614f24402e
|
|
4
|
+
data.tar.gz: 24f1a3cd917263e2c9a34e2baad7968696f0fff7845b9a943a55c4b4742e09a7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 342ae22edc3a3a423ae62a92710ed7dec2445023cd7164f299406fc423bc8e5acbee77a4bd475c2fd82f3cfe26b18eb0c864e58023fb8af1928f00d47a32d89e
|
|
7
|
+
data.tar.gz: eff30623ea4be4debcdee3c2c31645ab928e4ef9eeef83dbd4c6a295131bffdd6c1d7c38a68c9dc97f29bfb2667791a5be3e55eb0090b4c901000e898cb55dbf
|
data/CHANGELOG.md
CHANGED
data/capistrano-nomad.gemspec
CHANGED
|
@@ -328,6 +328,15 @@ def capistrano_nomad_fetch_job_var_files(name, **options)
|
|
|
328
328
|
capistrano_nomad_fetch_job_options(name, :var_files, **options) || []
|
|
329
329
|
end
|
|
330
330
|
|
|
331
|
+
# Build one command option per configured variable file so Nomad receives every file in order
|
|
332
|
+
def capistrano_nomad_build_job_var_file_options(name, **options)
|
|
333
|
+
capistrano_nomad_fetch_job_var_files(name, **options).map do |var_file|
|
|
334
|
+
{
|
|
335
|
+
var_file: capistrano_nomad_build_release_var_file_path(var_file, **options),
|
|
336
|
+
}
|
|
337
|
+
end
|
|
338
|
+
end
|
|
339
|
+
|
|
331
340
|
def capistrano_nomad_fetch_jobs_names_by_namespace(**options)
|
|
332
341
|
capistrano_nomad_ensure_options!(options)
|
|
333
342
|
namespace = options[:namespace]
|
|
@@ -521,14 +530,19 @@ def capistrano_nomad_upload_jobs(names, **options)
|
|
|
521
530
|
end
|
|
522
531
|
end
|
|
523
532
|
|
|
533
|
+
# Plan each job with every configured variable file before the uploaded job path
|
|
524
534
|
def capistrano_nomad_plan_jobs(names, **options)
|
|
525
535
|
names.each do |name|
|
|
526
|
-
args = [
|
|
536
|
+
args = [
|
|
537
|
+
*capistrano_nomad_build_job_var_file_options(name, **options),
|
|
538
|
+
capistrano_nomad_build_release_job_path(name, **options),
|
|
539
|
+
]
|
|
527
540
|
|
|
528
541
|
capistrano_nomad_execute_nomad_command(:plan, *args)
|
|
529
542
|
end
|
|
530
543
|
end
|
|
531
544
|
|
|
545
|
+
# Run each job with all configured variable files while preserving the existing command options
|
|
532
546
|
def capistrano_nomad_run_jobs(names, is_detached: true, **options)
|
|
533
547
|
capistrano_nomad_ensure_options!(options)
|
|
534
548
|
|
|
@@ -541,13 +555,10 @@ def capistrano_nomad_run_jobs(names, is_detached: true, **options)
|
|
|
541
555
|
preserve_counts: true,
|
|
542
556
|
}
|
|
543
557
|
|
|
544
|
-
capistrano_nomad_fetch_job_var_files(name, **options).each do |var_file|
|
|
545
|
-
run_options[:var_file] = capistrano_nomad_build_release_var_file_path(var_file, **options)
|
|
546
|
-
end
|
|
547
|
-
|
|
548
558
|
capistrano_nomad_execute_nomad_command(
|
|
549
559
|
:run,
|
|
550
560
|
run_options,
|
|
561
|
+
*capistrano_nomad_build_job_var_file_options(name, **options),
|
|
551
562
|
capistrano_nomad_build_release_job_path(name, **options),
|
|
552
563
|
)
|
|
553
564
|
end
|
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.16.
|
|
4
|
+
version: 0.16.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Hu
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-08-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
152
152
|
- !ruby/object:Gem::Version
|
|
153
153
|
version: '0'
|
|
154
154
|
requirements: []
|
|
155
|
-
rubygems_version: 3.
|
|
155
|
+
rubygems_version: 3.4.20
|
|
156
156
|
signing_key:
|
|
157
157
|
specification_version: 4
|
|
158
158
|
summary: Capistrano plugin for deploying and managing Nomad jobs
|