marathon_deploy 0.1.55 → 0.1.56
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/.travis.yml +5 -5
- data/Gemfile +1 -1
- data/README.md +1 -0
- data/bin/marathon_deploy +11 -1
- data/lib/marathon_deploy/marathon_defaults.rb +1 -0
- data/lib/marathon_deploy/version.rb +1 -1
- data/marathon_deploy.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e182d4388289931924735ff4831f9499932fc41
|
4
|
+
data.tar.gz: 4e83a35c61fdb0d2a60be351cb01f925986636f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 679cf7e493b39e2da0db382b669dcd4eb47ceb03c6e27f27cf29f23e22cdc8a323d26efe7f34befa545bb96797e1eb4b4ebd94a9d8a4974af5a0982288447530
|
7
|
+
data.tar.gz: f508e2e650c988dd4bd9ca2bfd86376191e926ef713542b5dc1f9e96c6bd6a4998e44a481630503e850de62f85fba708a93d4566f8d5e296e7f6c2402bc76f97
|
data/.travis.yml
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
language: ruby
|
2
|
-
|
3
|
-
-
|
4
|
-
before_install:
|
5
|
-
- gem uninstall bundler -x
|
6
|
-
- gem install bundler --version 1.11.2
|
2
|
+
rvm:
|
3
|
+
- 2.3.1
|
4
|
+
#before_install:
|
5
|
+
# - gem uninstall bundler -x
|
6
|
+
# - gem install bundler --version 1.11.2
|
7
7
|
deploy:
|
8
8
|
provider: rubygems
|
9
9
|
api_key:
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -49,6 +49,7 @@ Usage: bin/marathon_deploy [options]
|
|
49
49
|
-f, --force Force deployment when sending same deploy JSON to Marathon
|
50
50
|
-n, --noop No action. Just display what would be performed.
|
51
51
|
-i, --ignore-preproduction-defaults Ignores the preproduction defaults for cpu, memory, and instance limits
|
52
|
+
-R, --retry Will retry the deployment if the initial one fails
|
52
53
|
-e, --environment ENVIRONMENT Default: PREPRODUC
|
53
54
|
```
|
54
55
|
|
data/bin/marathon_deploy
CHANGED
@@ -23,6 +23,7 @@ options[:force] = MarathonDeploy::MarathonDefaults::DEFAULT_FORCE_DEPLOY
|
|
23
23
|
options[:noop] = MarathonDeploy::MarathonDefaults::DEFAULT_NOOP
|
24
24
|
options[:remove_elements] = MarathonDeploy::MarathonDefaults::DEFAULT_REMOVE_ELEMENTS
|
25
25
|
options[:ignore_preproduction_defaults] = MarathonDeploy::MarathonDefaults::DEFAULT_IGNORE_PREPRODUCTION_DEFAULTS
|
26
|
+
options[:retry] = MarathonDeploy::MarathonDefaults::DEFAULT_RETRY
|
26
27
|
options[:marathon_username] = nil
|
27
28
|
options[:marathon_password] = nil
|
28
29
|
|
@@ -51,6 +52,10 @@ OptionParser.new do |opts|
|
|
51
52
|
options[:deployment_timeout] = l
|
52
53
|
end
|
53
54
|
|
55
|
+
opts.on("-R", "--retry", "Default: #{options[:retry]}") do |i|
|
56
|
+
options[:retry] = true
|
57
|
+
end
|
58
|
+
|
54
59
|
opts.on("-d", "--debug", "Run in debug mode") do |d|
|
55
60
|
options[:debug] = Logger::DEBUG
|
56
61
|
end
|
@@ -184,10 +189,15 @@ marathon_endpoints.each do |marathon_url|
|
|
184
189
|
client = MarathonDeploy::MarathonClient.new(marathon_url, options)
|
185
190
|
client.application = application
|
186
191
|
client.deploy
|
187
|
-
rescue MarathonDeploy::Error::MissingMarathonAttributesError,MarathonDeploy::Error::BadURLError,
|
192
|
+
rescue MarathonDeploy::Error::MissingMarathonAttributesError,MarathonDeploy::Error::BadURLError,Timeout::Error => e
|
188
193
|
$LOG.error(e.message)
|
189
194
|
exit!
|
190
195
|
rescue MarathonDeploy::Error::DeploymentError => e
|
196
|
+
$LOG.error("Deployment of #{application} failed => #{e}")
|
197
|
+
if options[:retry]
|
198
|
+
$LOG.info("Deployment failed, retrying since retry is enabled")
|
199
|
+
client.deploy
|
200
|
+
end
|
191
201
|
$LOG.error("Deployment of #{application} failed => #{e}")
|
192
202
|
exit!
|
193
203
|
rescue SocketError, MarathonDeploy::Error::MarathonError => e
|
@@ -26,6 +26,7 @@ module MarathonDeploy
|
|
26
26
|
DEFAULT_FORCE_DEPLOY = false
|
27
27
|
DEFAULT_NOOP = false
|
28
28
|
DEFAULT_IGNORE_PREPRODUCTION_DEFAULTS = false
|
29
|
+
DEFAULT_RETRY = false
|
29
30
|
DEFAULT_REMOVE_ELEMENTS = []
|
30
31
|
DEFAULT_KEEP_ELEMENTS = [':id']
|
31
32
|
ENVIRONMENT_VARIABLE_PREFIX = 'MARATHON_DEPLOY_'
|
data/marathon_deploy.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.add_dependency "json"
|
27
27
|
spec.add_dependency "deep_merge", '~> 1.0', '>= 1.0.1'
|
28
28
|
|
29
|
-
spec.add_development_dependency "bundler", "~> 1.
|
29
|
+
spec.add_development_dependency "bundler", "~> 1.16.0"
|
30
30
|
spec.add_development_dependency "rake", "~> 10.0"
|
31
31
|
spec.add_development_dependency "minitest", "~> 5.7"
|
32
32
|
spec.add_development_dependency "yard"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marathon_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.56
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Colby
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logger
|
@@ -64,14 +64,14 @@ dependencies:
|
|
64
64
|
requirements:
|
65
65
|
- - ~>
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: 1.
|
67
|
+
version: 1.16.0
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - ~>
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: 1.
|
74
|
+
version: 1.16.0
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: rake
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -238,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
238
238
|
version: '0'
|
239
239
|
requirements: []
|
240
240
|
rubyforge_project:
|
241
|
-
rubygems_version: 2.0.14
|
241
|
+
rubygems_version: 2.0.14.1
|
242
242
|
signing_key:
|
243
243
|
specification_version: 4
|
244
244
|
summary: Mesos/Marathon deployment tool.
|