kontena-cli 1.2.2.rc1 → 1.2.2.rc2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7db7c48764f8cf25a6c8299cfea9a9114bf22e60
4
- data.tar.gz: 6dd47f6ca45694944a84a785f4e44dd1e679813d
3
+ metadata.gz: 162858ba6e59443380f7e24294ebae4e3b778469
4
+ data.tar.gz: 736156b4a0301f2b6e03d5120133911f4d394b01
5
5
  SHA512:
6
- metadata.gz: 66602d4abf1853a69113535b6df1c680e957c9fb505ba7c616ea9d72e4eb9fa501b0f5627ae73565688c98035030cecf3b44aa2306c6268810cf22f5b4396ab6
7
- data.tar.gz: 0403f16eff264d3841a9b56b508ddd6f789f353d8bc91b85a95853a6562951a0f2a8987878b66ab292faed249ea83e1c4fa7b792d0b454742826532c19d8c0e4
6
+ metadata.gz: ec8b53ca0d6fcad53ecb07b9184fa51879d777de5377de1d3998e3c536c265aeba785bd04b372efbd7bb212b81f68199df3a0899068b1edcadf04eae5eb55753
7
+ data.tar.gz: 94a9975353877f7f28542a57722660c1fef23def52fc55cbd877e5693338c98de9c48125dffb27ee348ec230fa5d25cb0ab6020d5741a903ea8b979c37cf1750
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.2.rc1
1
+ 1.2.2.rc2
@@ -37,12 +37,12 @@ module Kontena::Cli::Stacks
37
37
  service_deploy = deployment['service_deploys'].find{ |s| s['state'] == 'ongoing' }
38
38
  if service_deploy
39
39
  tracked_services << service_deploy['id']
40
- wait_for_service_deploy(service_deploy, states)
40
+ wait_for_service_deploy(service_deploy)
41
41
  end
42
42
  if states.include?(deployment['state'])
43
43
  deployed = true
44
44
  deployment['service_deploys'].select{ |s| !tracked_services.include?(s['id']) }.each do |s|
45
- wait_for_service_deploy(s, states)
45
+ wait_for_service_deploy(s)
46
46
  end
47
47
  else
48
48
  sleep 1
@@ -69,19 +69,14 @@ module Kontena::Cli::Stacks
69
69
  raise 'deploy timed out'
70
70
  end
71
71
 
72
- def wait_for_service_deploy(service_deploy, states)
73
- service_deployed = false
72
+ def wait_for_service_deploy(service_deploy)
74
73
  name = service_deploy['service_id'].split('/')[-1]
75
74
  spinner "Deploying service #{pastel.cyan(name)}" do |spin|
76
- until service_deployed
77
- r = client.get("services/#{service_deploy['service_id']}/deploys/#{service_deploy['id']}")
78
- if states.include?(r['state'])
79
- service_deployed = true
80
- spin.fail if r['state'] == 'error'
81
- else
82
- sleep 1
83
- end
75
+ until service_deploy['finished_at']
76
+ sleep 1
77
+ service_deploy = client.get("services/#{service_deploy['service_id']}/deploys/#{service_deploy['id']}")
84
78
  end
79
+ spin.fail if service_deploy['state'] == 'error'
85
80
  end
86
81
  end
87
82
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kontena-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2.rc1
4
+ version: 1.2.2.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kontena, Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-08 00:00:00.000000000 Z
11
+ date: 2017-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler