marathon_deploy 0.1.54 → 0.1.55

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 56aa5c81bad40c47bf112ff8cec36f859d3706ce
4
- data.tar.gz: 6063decec7f1a13cf98b82916e9c7f993b9fd29b
3
+ metadata.gz: 0b0289636d1856134a9bebb316c059306007928f
4
+ data.tar.gz: 1baee536c47b2de9ac27c732e6ca4ff2eea79d3e
5
5
  SHA512:
6
- metadata.gz: 39e4852f16ef71a5311870e2ffe903c9121cfd3a9ad5151bc804f0d50cada69db26cf4e111f7bb67135d1a78fb7beaa720e5a646fe7334c1a3ba79a646945c77
7
- data.tar.gz: 93d9544b1726289a8f33e3fb58e6e98bc450668f668e7f6892bff3371d6248d354ded440a407f747c0206a022be49e66f477cd1f407702a6f804a029b7939d9a
6
+ metadata.gz: 2882595a7a1053517a0b1e3316050e0fc4b11d5a066bf38f835b4803a07a45300a580e2edc1282f99a506a40125ef5b0c7c9f0a87691f6dedd28e53832bc3b05
7
+ data.tar.gz: fd9359ac1b8251e74c6447ec9fcef5646a62ee92047c7abc5271282deeb0659a0dc881610c5ff4a901b9512497cf4831868c5d58210361e9e067f576b095a5da
data/bin/marathon_deploy CHANGED
@@ -18,6 +18,7 @@ options[:debug] = MarathonDeploy::MarathonDefaults::DEFAULT_LOGLEVEL
18
18
  options[:environment] = MarathonDeploy::MarathonDefaults::DEFAULT_ENVIRONMENT_NAME
19
19
  options[:marathon_endpoints] = MarathonDeploy::MarathonDefaults::DEFAULT_PREPRODUCTION_MARATHON_ENDPOINTS
20
20
  options[:logfile] = MarathonDeploy::MarathonDefaults::DEFAULT_LOGFILE
21
+ options[:deployment_timeout] = MarathonDeploy::MarathonDefaults::DEPLOYMENT_TIMEOUT
21
22
  options[:force] = MarathonDeploy::MarathonDefaults::DEFAULT_FORCE_DEPLOY
22
23
  options[:noop] = MarathonDeploy::MarathonDefaults::DEFAULT_NOOP
23
24
  options[:remove_elements] = MarathonDeploy::MarathonDefaults::DEFAULT_REMOVE_ELEMENTS
@@ -46,6 +47,10 @@ OptionParser.new do |opts|
46
47
  options[:logfile] = l
47
48
  end
48
49
 
50
+ opts.on("-t", "--timeout SECONDS", "Default: 300") do |l|
51
+ options[:deployment_timeout] = l
52
+ end
53
+
49
54
  opts.on("-d", "--debug", "Run in debug mode") do |d|
50
55
  options[:debug] = Logger::DEBUG
51
56
  end
@@ -176,7 +181,7 @@ marathon_endpoints.each do |marathon_url|
176
181
  begin
177
182
  puts "[NOOP] Sending JSON deployment instructions to marathon endpoint: #{marathon_url}." if (noop)
178
183
  next if (noop)
179
- client = MarathonDeploy::MarathonClient.new(marathon_url)
184
+ client = MarathonDeploy::MarathonClient.new(marathon_url, options)
180
185
  client.application = application
181
186
  client.deploy
182
187
  rescue MarathonDeploy::Error::MissingMarathonAttributesError,MarathonDeploy::Error::BadURLError, Timeout::Error => e
@@ -14,7 +14,7 @@ module MarathonDeploy
14
14
 
15
15
  attr_reader :url, :application, :deploymentId
16
16
 
17
- def initialize(url, application)
17
+ def initialize(url, application, deployment_timeout = DEPLOYMENT_TIMEOUT)
18
18
  raise ArgumentError, "second argument to deployment object must be an Application", caller unless (!application.nil? && application.class == Application)
19
19
  raise Error::BadURLError, "invalid url => #{url}", caller if (!HttpUtil.valid_url(url))
20
20
  @url = HttpUtil.clean_url(url)
@@ -28,7 +28,7 @@ module MarathonDeploy
28
28
 
29
29
  def deploy
30
30
 
31
- deployment = Deployment.new(@marathon_url,application)
31
+ deployment = Deployment.new(@marathon_url,application, options[:deployment_timeout])
32
32
 
33
33
  $LOG.info("Checking if any deployments are already running for application #{application.id}")
34
34
  begin
@@ -1,3 +1,3 @@
1
1
  module MarathonDeploy
2
- VERSION = "0.1.54"
2
+ VERSION = "0.1.55"
3
3
  end
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.54
4
+ version: 0.1.55
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Colby
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-17 00:00:00.000000000 Z
11
+ date: 2017-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logger