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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 25b29aaa6c532b6656df34b6ebc7ebc23359c4acb3ae2b8c5d7320a2e79c7f66
4
- data.tar.gz: 770838795fb494f1c4305168d6b60f51be7f1d33bec9c31e45b7d119ecd427f0
3
+ metadata.gz: 1f13cb3a6f203bc88f1bad802dea89660937818fe4568824fb0f2aa9ed789fab
4
+ data.tar.gz: '09f27219c86a2fe67e2d47a660cabdef3844517954feba31141d4c38fb20d6a5'
5
5
  SHA512:
6
- metadata.gz: 24cd34d64db04c41e6b2e39ced4e84129e4fb3ff2d70a25e53d945e2bcdaf35e7a45f6783c1e5cd37d061053ba24b2717d939f6b3e0cd0939c14bc8f39def70d
7
- data.tar.gz: e978fbbf7205ed2d160e2702ae9109ba73722c695f9de2e0c8f51cc010a248da5ffbed583d452e1bcc7a6e0ee22989202afd183430256ae73cc7f0f4515d83fa
6
+ metadata.gz: 3cd44e5fb4c6cbd3db75cc22f67ef116d0ece07965c1e20387cebee287bf28de7b09ee9d8cd5d9b0cff29a1bb0ae0a5d16d0deb451cdeb731ddcdd32fbfa0a57
7
+ data.tar.gz: 9759e600f1bc654c9093b5e72606de756bf220271a11ee6a0b8fc770b78f78e638f4557ba6054e57326f4cd5ef4ee05de6183a66f1e0351fc9129bd5bbcf4177
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capistrano-nomad (0.6.2)
4
+ capistrano-nomad (0.6.3)
5
5
  activesupport (<= 7.0.8)
6
6
  byebug
7
7
  capistrano (~> 3.0)
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "capistrano-nomad"
5
- spec.version = "0.6.2"
5
+ spec.version = "0.6.3"
6
6
  spec.authors = ["James Hu"]
7
7
 
8
8
  spec.summary = "Capistrano plugin for deploying and managing Nomad jobs"
@@ -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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-nomad
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Hu