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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40b9b44a616fbf4c542f561845ffb785aa73b476027f78ee227953b15ab326a4
4
- data.tar.gz: 9ebe475b0c6af2aee4c098536e9453fe231fcb7e9c86ce0b30e940ebc0f8d7f1
3
+ metadata.gz: 137c81e55b24eb37ce7b3e39722c378d2addea5c5b331ceadeb6d5614f24402e
4
+ data.tar.gz: 24f1a3cd917263e2c9a34e2baad7968696f0fff7845b9a943a55c4b4742e09a7
5
5
  SHA512:
6
- metadata.gz: 0e7c48930dbc272c34c48922a2b93bb67b78d4729f2e2ca4c4602e33ed9019834d0c65b2cffaafa5bcdd450aeef335a8df95628dceb385f322b36815d96ef0f9
7
- data.tar.gz: ca780918d90383b5232ff2c1c27e5d6ed65085358e475e7cf132fed07fd527f15fb6013fe732f9dc8cbdd9ebd179faacb751c73b0aa723aa0f377211169cb64a
6
+ metadata.gz: 342ae22edc3a3a423ae62a92710ed7dec2445023cd7164f299406fc423bc8e5acbee77a4bd475c2fd82f3cfe26b18eb0c864e58023fb8af1928f00d47a32d89e
7
+ data.tar.gz: eff30623ea4be4debcdee3c2c31645ab928e4ef9eeef83dbd4c6a295131bffdd6c1d7c38a68c9dc97f29bfb2667791a5be3e55eb0090b4c901000e898cb55dbf
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.16.1]
4
+
5
+ - Pass every configured variable file to `nomad plan` and `nomad run`
6
+
3
7
  ## [0.16.0]
4
8
 
5
9
  - Add `:redeploy` task that stops job before performing a full deploy to ensure fresh allocations
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "capistrano-nomad"
5
- spec.version = "0.16.0"
5
+ spec.version = "0.16.1"
6
6
  spec.authors = ["James Hu"]
7
7
 
8
8
  spec.summary = "Capistrano plugin for deploying and managing Nomad jobs"
@@ -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 = [capistrano_nomad_build_release_job_path(name, **options)]
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.0
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-02-15 00:00:00.000000000 Z
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.3.27
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