nomade 0.1.1 → 0.1.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/lib/nomade/deployer.rb +12 -7
- 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: e55097372de361a10d732fb15534044a7f61e2d7d3f99bcdbc32d247aa38fe15
|
|
4
|
+
data.tar.gz: 3eb026188607bb0dd4814f996d7a5290733832cd669bdc73942a8c3c3f825115
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e048c5df4f909bfdb575c12740a12b7e2985a74782eb6b54689f203356684754ea52f7b8f2eebabe0f44de24d1f7bc22815c6a86b19fdeddbbdfb9fd943ab1e9
|
|
7
|
+
data.tar.gz: 1bbd0a9dcf2417651dfab2a64c41c3ffd39a80795d55f92dcc155f10d7c6e5b03f01a6982d11515eb79a54098ca2f7ad387098e3fa83400b6dffad9e7b5600ef
|
data/lib/nomade/deployer.rb
CHANGED
|
@@ -15,6 +15,12 @@ module Nomade
|
|
|
15
15
|
Nomade::Hooks::DEPLOY_FINISHED => [],
|
|
16
16
|
Nomade::Hooks::DEPLOY_FAILED => [],
|
|
17
17
|
}
|
|
18
|
+
add_hook(Nomade::Hooks::DEPLOY_FAILED, lambda {|hook_type, nomad_job, messages|
|
|
19
|
+
@logger.error "Failing deploy:"
|
|
20
|
+
messages.each do |message|
|
|
21
|
+
@logger.error "- #{message}"
|
|
22
|
+
end
|
|
23
|
+
})
|
|
18
24
|
|
|
19
25
|
self
|
|
20
26
|
end
|
|
@@ -45,22 +51,21 @@ module Nomade
|
|
|
45
51
|
_deploy
|
|
46
52
|
run_hooks(Nomade::Hooks::DEPLOY_FINISHED, @nomad_job, nil)
|
|
47
53
|
rescue Nomade::NoModificationsError => e
|
|
48
|
-
run_hooks(Nomade::Hooks::DEPLOY_FAILED, @nomad_job, [e.message, "No modifications to make, exiting!"])
|
|
49
|
-
exit(0)
|
|
54
|
+
run_hooks(Nomade::Hooks::DEPLOY_FAILED, @nomad_job, [e.class.to_s, e.message, "No modifications to make, exiting!"].compact.uniq)
|
|
50
55
|
rescue Nomade::GeneralError => e
|
|
51
|
-
run_hooks(Nomade::Hooks::DEPLOY_FAILED, @nomad_job, [e.message, "GeneralError hit, exiting!"])
|
|
56
|
+
run_hooks(Nomade::Hooks::DEPLOY_FAILED, @nomad_job, [e.class.to_s, e.message, "GeneralError hit, exiting!"].compact.uniq)
|
|
52
57
|
exit(1)
|
|
53
58
|
rescue Nomade::AllocationFailedError => e
|
|
54
|
-
run_hooks(Nomade::Hooks::DEPLOY_FAILED, @nomad_job, [e.message, "Allocation failed with errors, exiting!"])
|
|
59
|
+
run_hooks(Nomade::Hooks::DEPLOY_FAILED, @nomad_job, [e.class.to_s, e.message, "Allocation failed with errors, exiting!"].compact.uniq)
|
|
55
60
|
exit(3)
|
|
56
61
|
rescue Nomade::UnsupportedDeploymentMode => e
|
|
57
|
-
run_hooks(Nomade::Hooks::DEPLOY_FAILED, @nomad_job, [e.message, "Deployment failed with errors, exiting!"])
|
|
62
|
+
run_hooks(Nomade::Hooks::DEPLOY_FAILED, @nomad_job, [e.class.to_s, e.message, "Deployment failed with errors, exiting!"].compact.uniq)
|
|
58
63
|
exit(4)
|
|
59
64
|
rescue Nomade::FailedTaskGroupPlan => e
|
|
60
|
-
run_hooks(Nomade::Hooks::DEPLOY_FAILED, @nomad_job, [e.message, "Couldn't plan correctly, exiting!"])
|
|
65
|
+
run_hooks(Nomade::Hooks::DEPLOY_FAILED, @nomad_job, [e.class.to_s, e.message, "Couldn't plan correctly, exiting!"].compact.uniq)
|
|
61
66
|
exit(5)
|
|
62
67
|
rescue Nomade::DeploymentFailedError => e
|
|
63
|
-
run_hooks(Nomade::Hooks::DEPLOY_FAILED, @nomad_job, [e.message, "Couldn't deploy succesfully, exiting!"])
|
|
68
|
+
run_hooks(Nomade::Hooks::DEPLOY_FAILED, @nomad_job, [e.class.to_s, e.message, "Couldn't deploy succesfully, exiting!"].compact.uniq)
|
|
64
69
|
exit(6)
|
|
65
70
|
end
|
|
66
71
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nomade
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kasper Grubbe
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-03-
|
|
11
|
+
date: 2020-03-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: yell
|