capistrano-nomad 0.12.2 → 0.12.3

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: 9ea1dce7c57651a12a7f34dae3d0451cb964500b28c5356b12fbe552b7811f0a
4
- data.tar.gz: 3f4a63bb2294ad4928faecd28f1bd0003d0f09b249ccf2649e5228918e562904
3
+ metadata.gz: 89b75d3c252d55a0e4c8f9ffcca21f49092bbdbd35a0bdb4c7f382b8a6a2e9f0
4
+ data.tar.gz: 753c67433f965fb35550c8c61e0bf3102b20bf29aba48de00757a19068310aae
5
5
  SHA512:
6
- metadata.gz: 168ea50bf0399fa51a796362555a2a29ebe0637f2d7896c2a1f1a83b451fd5d6b35eebb29907b9f6a80c675305ffd319a8acbcab28b5ffc2002c940dc49c1d31
7
- data.tar.gz: 0e7eed0ef654d2b945d9d2dd7b7089918aebaac61e3d71b9e8210a8f5038e5cf3baf938c849746da06f80dc97b32f6f0d1fc17cefa697d639221be137fef229c
6
+ metadata.gz: dc425ee048f8c90dc9fe962815689eafc8edce97ae3523c3c53586f377825cd660cd15e68a35d343c51f520502f3f93a2880570dd8f9c2c46f1f99c96634db9d
7
+ data.tar.gz: 4ddf88946fd7dbbde8fcd9e3420c2b044957e1d9a16d353e29ea3050108ce1db648a918ec588a5c3af1c6f33bd749124b1ad7c9416db12317569281a74d4825d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capistrano-nomad (0.12.2)
4
+ capistrano-nomad (0.12.3)
5
5
  activesupport (<= 7.0.8)
6
6
  byebug
7
7
  capistrano (~> 3.0)
data/README.md CHANGED
@@ -99,7 +99,7 @@ nomad_docker_image_type :restic,
99
99
 
100
100
  # Jobs
101
101
  nomad_job :backend, docker_image_types: [:backend], var_files: [:rails]
102
- nomad_job :frontend
102
+ nomad_job :frontend, console_command: "/bin/bash"
103
103
  nomad_job :postgres, docker_image_types: [:postgres]
104
104
  nomad_job :redis, docker_image_types: [:redis], tags: [:redis]
105
105
  nomad_job :"traefik-default", template: :admin,
@@ -150,7 +150,7 @@ Open console
150
150
  ```shell
151
151
  cap production nomad:app:console
152
152
  cap production nomad:app:console TASK=custom-task-name
153
- cap production nomad:analytics:grafana:console
153
+ cap production nomad:analytics:grafana:console CMD=/bin/bash
154
154
  ```
155
155
 
156
156
  Display logs
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "capistrano-nomad"
5
- spec.version = "0.12.2"
5
+ spec.version = "0.12.3"
6
6
  spec.authors = ["James Hu"]
7
7
 
8
8
  spec.summary = "Capistrano plugin for deploying and managing Nomad jobs"
@@ -141,7 +141,8 @@ def nomad_job(name, attributes = {})
141
141
 
142
142
  desc("Open console to #{description_name} job. Specify task with TASK, command with CMD")
143
143
  task(:console) do
144
- command = ENV["CMD"].presence || "/bin/sh"
144
+ job_options = capistrano_nomad_fetch_job_options(name, namespace: namespace)
145
+ command = ENV["COMMAND"].presence || ENV["CMD"].presence || job_options[:console_command] || "/bin/sh"
145
146
 
146
147
  capistrano_nomad_exec_within_job(name, command, namespace: namespace, task: ENV["TASK"])
147
148
  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.12.2
4
+ version: 0.12.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Hu
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-03-14 00:00:00.000000000 Z
11
+ date: 2025-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport