capistrano-nomad 0.6.2 → 0.6.3
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/dsl.rb +15 -10
- data/lib/capistrano/nomad/helpers/nomad.rb +6 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f13cb3a6f203bc88f1bad802dea89660937818fe4568824fb0f2aa9ed789fab
|
4
|
+
data.tar.gz: '09f27219c86a2fe67e2d47a660cabdef3844517954feba31141d4c38fb20d6a5'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cd44e5fb4c6cbd3db75cc22f67ef116d0ece07965c1e20387cebee287bf28de7b09ee9d8cd5d9b0cff29a1bb0ae0a5d16d0deb451cdeb731ddcdd32fbfa0a57
|
7
|
+
data.tar.gz: 9759e600f1bc654c9093b5e72606de756bf220271a11ee6a0b8fc770b78f78e638f4557ba6054e57326f4cd5ef4ee05de6183a66f1e0351fc9129bd5bbcf4177
|
data/Gemfile.lock
CHANGED
data/capistrano-nomad.gemspec
CHANGED
@@ -58,16 +58,6 @@ def nomad_job(name, attributes = {})
|
|
58
58
|
capistrano_nomad_rerun_jobs([name], namespace: namespace)
|
59
59
|
end
|
60
60
|
|
61
|
-
desc "Purge #{description_name} job"
|
62
|
-
task :purge do
|
63
|
-
capistrano_nomad_purge_jobs([name], namespace: namespace, is_detached: false)
|
64
|
-
end
|
65
|
-
|
66
|
-
desc "Display status of #{description_name} job"
|
67
|
-
task :status do
|
68
|
-
capistrano_nomad_display_job_status(name, namespace: namespace)
|
69
|
-
end
|
70
|
-
|
71
61
|
desc "Upload and plan #{description_name} job"
|
72
62
|
task :upload_plan do
|
73
63
|
capistrano_nomad_upload_plan_jobs([name], namespace: namespace)
|
@@ -93,6 +83,21 @@ def nomad_job(name, attributes = {})
|
|
93
83
|
capistrano_nomad_restart_jobs([name], namespace: namespace)
|
94
84
|
end
|
95
85
|
|
86
|
+
desc "Stop #{description_name} job"
|
87
|
+
task :stop do
|
88
|
+
capistrano_nomad_stop_jobs([name], namespace: namespace)
|
89
|
+
end
|
90
|
+
|
91
|
+
desc "Purge #{description_name} job"
|
92
|
+
task :purge do
|
93
|
+
capistrano_nomad_purge_jobs([name], namespace: namespace, is_detached: false)
|
94
|
+
end
|
95
|
+
|
96
|
+
desc "Display status of #{description_name} job"
|
97
|
+
task :status do
|
98
|
+
capistrano_nomad_display_job_status(name, namespace: namespace)
|
99
|
+
end
|
100
|
+
|
96
101
|
desc "Open console to #{description_name} job. Specify task by passing TASK environment variable"
|
97
102
|
task :console do
|
98
103
|
capistrano_nomad_exec_within_job(name, "/bin/bash", namespace: namespace, task: ENV["TASK"].presence)
|
@@ -321,6 +321,12 @@ def capistrano_nomad_deploy_jobs(names, *args)
|
|
321
321
|
capistrano_nomad_upload_run_jobs(names, *args)
|
322
322
|
end
|
323
323
|
|
324
|
+
def capistrano_nomad_stop_jobs(names, namespace: nil)
|
325
|
+
names.each do |name|
|
326
|
+
capistrano_nomad_execute_nomad_command(:job, :stop, { namespace: namespace }, name)
|
327
|
+
end
|
328
|
+
end
|
329
|
+
|
324
330
|
def capistrano_nomad_restart_jobs(names, namespace: nil)
|
325
331
|
names.each do |name|
|
326
332
|
capistrano_nomad_execute_nomad_command(:job, :restart, { namespace: namespace }, name)
|