capistrano-nomad 0.4.1 → 0.4.2
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/Gemfile.lock +1 -1
- data/README.md +9 -1
- data/capistrano-nomad.gemspec +1 -1
- data/lib/capistrano/nomad/helpers/dsl.rb +2 -2
- data/lib/capistrano/nomad/helpers/nomad.rb +8 -2
- 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: 02c77eac2e5164a6644400d4eca6b03b57dffac252ad90d224f3b2c184bbda6c
|
|
4
|
+
data.tar.gz: da268efd0e1118b5fab7b1190469b3b3154221dfedf641a4f2fd41b416f9cb94
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5b1c53a098c84fa455ed9774376fe646a154436e96d2807050b0cb510484073d7993040571ba231f547478e4a43ee3f105690d7899f8f6a38dac3992567e88f
|
|
7
|
+
data.tar.gz: a3936fbea10215f136ef8630d5ca0d8253991af7bf16d02b5a7d1615eeaaa11fc6ed38376608a0cfe21b301d34d245196adb5941749fad885f2d574bbd2f523d
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -42,7 +42,7 @@ nomad_namespace :analytics do
|
|
|
42
42
|
end
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
Deploy with
|
|
46
46
|
|
|
47
47
|
```shell
|
|
48
48
|
cap production nomad:app:deploy
|
|
@@ -50,6 +50,14 @@ cap production nomad:redis:purge
|
|
|
50
50
|
cap production nomad:analytics:grafana:deploy
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
+
Open console with
|
|
54
|
+
|
|
55
|
+
```shell
|
|
56
|
+
cap production nomad:app:console
|
|
57
|
+
cap production nomad:app:console TASK=custom-task-name
|
|
58
|
+
cap production nomad:analytics:grafana:console
|
|
59
|
+
```
|
|
60
|
+
|
|
53
61
|
## Development
|
|
54
62
|
|
|
55
63
|
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/capistrano-nomad.gemspec
CHANGED
|
@@ -107,9 +107,9 @@ def nomad_job(name, attributes = {})
|
|
|
107
107
|
end
|
|
108
108
|
end
|
|
109
109
|
|
|
110
|
-
desc "Open console to #{description_name} job"
|
|
110
|
+
desc "Open console to #{description_name} job. Specify task by passing TASK environment variable"
|
|
111
111
|
task :console do
|
|
112
|
-
capistrano_nomad_exec_within_job(name, "/bin/bash", namespace: namespace)
|
|
112
|
+
capistrano_nomad_exec_within_job(name, "/bin/bash", namespace: namespace, task: ENV["TASK"].presence)
|
|
113
113
|
end
|
|
114
114
|
end
|
|
115
115
|
end
|
|
@@ -105,8 +105,14 @@ def capistrano_nomad_execute_nomad_command(*args)
|
|
|
105
105
|
end
|
|
106
106
|
end
|
|
107
107
|
|
|
108
|
-
def capistrano_nomad_exec_within_job(name, command, namespace: nil)
|
|
109
|
-
capistrano_nomad_execute_nomad_command(
|
|
108
|
+
def capistrano_nomad_exec_within_job(name, command, namespace: nil, task: nil)
|
|
109
|
+
capistrano_nomad_execute_nomad_command(
|
|
110
|
+
:alloc,
|
|
111
|
+
:exec,
|
|
112
|
+
{ namespace: namespace, task: task || name, job: true },
|
|
113
|
+
name,
|
|
114
|
+
command,
|
|
115
|
+
)
|
|
110
116
|
end
|
|
111
117
|
|
|
112
118
|
def capistrano_nomad_upload_file(local_path:, remote_path:, erb_vars: {})
|
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.4.
|
|
4
|
+
version: 0.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Hu
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-10-
|
|
11
|
+
date: 2023-10-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|