capistrano-nomad 0.8.5 → 0.8.6
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/capistrano-nomad.gemspec +1 -1
- data/lib/capistrano/nomad/helpers/git.rb +5 -1
- data/lib/capistrano/nomad/helpers/nomad.rb +18 -4
- 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: 38466c64a01144c2504b25cffc4d0a504323d8426a6d266b8596afbde174cc3b
|
4
|
+
data.tar.gz: 4f1921130d34135d6399dc66014ae09fef023a32d468729c001da69b46677b6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b19ed0fa9f0bd9f69b2679b26d282f2263307313b6376f95f32e65eb7ba08b7645e93d3e83232718a05abd5e8fc4ad378ba301d59a0fa6605cf0b5a30d08ffbf
|
7
|
+
data.tar.gz: 9ea11f2baf2ba068b5150b0294dfbba1142e5a89bdec74fa692e338cc02f05a1bbb313633e80d496f7f0b4350f14a4659003c4e1c9be41339c45c3b2381c7799
|
data/Gemfile.lock
CHANGED
data/capistrano-nomad.gemspec
CHANGED
@@ -4,6 +4,10 @@ def capistrano_nomad_git
|
|
4
4
|
@capistrano_nomad_git ||= Git.open(".")
|
5
5
|
end
|
6
6
|
|
7
|
+
def capistrano_nomad_git_commit
|
8
|
+
@capistrano_nomad_git_commit ||= capistrano_nomad_git.log.first
|
9
|
+
end
|
10
|
+
|
7
11
|
def capistrano_nomad_git_commit_id
|
8
|
-
@capistrano_nomad_git_commit_id ||=
|
12
|
+
@capistrano_nomad_git_commit_id ||= capistrano_nomad_git_commit.sha
|
9
13
|
end
|
@@ -325,6 +325,20 @@ def capistrano_nomad_define_group_tasks(namespace:)
|
|
325
325
|
end
|
326
326
|
end
|
327
327
|
|
328
|
+
desc "Restart #{namespace} jobs"
|
329
|
+
task :restart do
|
330
|
+
capistrano_nomad_fetch_jobs_names_by_namespace(namespace: namespace).each do |namespace_by, names|
|
331
|
+
capistrano_nomad_restart_jobs(names, namespace: namespace_by)
|
332
|
+
end
|
333
|
+
end
|
334
|
+
|
335
|
+
desc "Stop #{namespace} jobs"
|
336
|
+
task :stop do
|
337
|
+
capistrano_nomad_fetch_jobs_names_by_namespace(namespace: namespace).each do |namespace_by, names|
|
338
|
+
capistrano_nomad_stop_jobs(names, namespace: namespace_by)
|
339
|
+
end
|
340
|
+
end
|
341
|
+
|
328
342
|
desc "Purge #{namespace} jobs"
|
329
343
|
task :purge do
|
330
344
|
capistrano_nomad_fetch_jobs_names_by_namespace(namespace: namespace).each do |namespace_by, names|
|
@@ -453,15 +467,15 @@ def capistrano_nomad_deploy_jobs(names, **options)
|
|
453
467
|
capistrano_nomad_upload_run_jobs(names, **general_options.merge(options))
|
454
468
|
end
|
455
469
|
|
456
|
-
def
|
470
|
+
def capistrano_nomad_restart_jobs(names, **options)
|
457
471
|
names.each do |name|
|
458
|
-
capistrano_nomad_execute_nomad_command(:job, :
|
472
|
+
capistrano_nomad_execute_nomad_command(:job, :restart, options, name)
|
459
473
|
end
|
460
474
|
end
|
461
475
|
|
462
|
-
def
|
476
|
+
def capistrano_nomad_stop_jobs(names, **options)
|
463
477
|
names.each do |name|
|
464
|
-
capistrano_nomad_execute_nomad_command(:job, :
|
478
|
+
capistrano_nomad_execute_nomad_command(:job, :stop, options, name)
|
465
479
|
end
|
466
480
|
end
|
467
481
|
|
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.8.
|
4
|
+
version: 0.8.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Hu
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|