capistrano-nomad 0.13.2 → 0.14.0
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/CHANGELOG.md +8 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/capistrano-nomad.gemspec +1 -1
- data/lib/capistrano/nomad/helpers/dsl.rb +7 -1
- data/lib/capistrano/nomad/helpers/nomad.rb +1 -1
- 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: 077546bb337f4b20a5558aedd518010f9958ce8b59a8caf67b2dc602ea046c0c
|
|
4
|
+
data.tar.gz: c45ffbfc217ef342abf933f4883ebb06fbb8f4adb6f5fe1b93883048a3fe1e2a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0bdceb473ffecfa4e8dc10564214eea210016749d470cbb6fd11a59df0fdd5dca72a623c76f99b25f4163ab934d0796cec547d546581486a155ff487856ae001
|
|
7
|
+
data.tar.gz: 572627c25f188ef9788d2b23c2fa4bfcc66850af933c63ed6210347aa5f94ab3662f2df3d5f789a4c3c490fdc115c8d9c5d180dbb621239f2ddf448cc35142f3
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.14.0]
|
|
4
|
+
|
|
5
|
+
- `nomad:deploy` properly deploys all jobs across all namespaces now
|
|
6
|
+
|
|
7
|
+
## [0.13.3]
|
|
8
|
+
|
|
9
|
+
- Support for namespace-level `erb_vars` that are passed to all jobs within that namespace
|
|
10
|
+
|
|
3
11
|
## [0.13.2]
|
|
4
12
|
|
|
5
13
|
- Add missing start job task
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -112,7 +112,7 @@ nomad_job :"traefik-secondary", template: :admin,
|
|
|
112
112
|
erb_vars: { role: :secondary },
|
|
113
113
|
tags: [:traefik]
|
|
114
114
|
|
|
115
|
-
nomad_namespace :analytics, tags: [:admin] do
|
|
115
|
+
nomad_namespace :analytics, tags: [:admin], erb_vars: { role: :default } do
|
|
116
116
|
nomad_job :grafana
|
|
117
117
|
end
|
|
118
118
|
|
data/capistrano-nomad.gemspec
CHANGED
|
@@ -43,9 +43,15 @@ def nomad_job(name, attributes = {})
|
|
|
43
43
|
|
|
44
44
|
attributes[:tags] ||= []
|
|
45
45
|
|
|
46
|
-
# Tags added to namespace should be added to all jobs within
|
|
47
46
|
if (nomad_namespace_options = capistrano_nomad_fetch_namespace_options(namespace: @nomad_namespace))
|
|
47
|
+
# Tags added to namespace should be added to all jobs within
|
|
48
48
|
attributes[:tags] += nomad_namespace_options[:tags] || []
|
|
49
|
+
|
|
50
|
+
# ERB vars added to namespace should be added to all jobs within
|
|
51
|
+
if (namespace_erb_vars = nomad_namespace_options[:erb_vars])
|
|
52
|
+
attributes[:erb_vars] ||= {}
|
|
53
|
+
attributes[:erb_vars].reverse_merge!(namespace_erb_vars)
|
|
54
|
+
end
|
|
49
55
|
end
|
|
50
56
|
|
|
51
57
|
nomad_jobs = fetch(:nomad_jobs) || Hash.new { |h, n| h[n] = {} }
|
|
@@ -261,7 +261,7 @@ def capistrano_nomad_upload(local_path:, remote_path:, erb_vars: {})
|
|
|
261
261
|
end
|
|
262
262
|
|
|
263
263
|
def capistrano_nomad_ensure_options!(options)
|
|
264
|
-
options[:namespace]
|
|
264
|
+
options[:namespace] = :default unless options.key?(:namespace)
|
|
265
265
|
end
|
|
266
266
|
|
|
267
267
|
def capistrano_nomad_fetch_namespace_options(**options)
|