kontena-cli 0.16.0.rc2 → 0.16.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/kontena/callbacks/master/deploy/05_before_deploy_configuration_wizard.rb +5 -1
- data/lib/kontena/cli/cloud/login_command.rb +2 -0
- data/lib/kontena/cli/cloud/master/add_command.rb +2 -0
- data/lib/kontena/cli/common.rb +4 -0
- data/lib/kontena/cli/config.rb +1 -0
- data/lib/kontena/cli/master/login_command.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 639ee46ae3a2e35cd233618b89c463e8b66afec6
|
4
|
+
data.tar.gz: d1fa540a0a6f95deae41f8f89da60d07b62138dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c181a8df5253b768c91afd964327bf9a5b940156bd453fdb0f5fc2e804e22470ad51ebe0cdaab1f0de6f491c76bb19fb7c7d48542b2a9ea58e840a8a1e3ee09
|
7
|
+
data.tar.gz: d096bbb4557f247a3e6345e32a6fb95dafb1e79b091bc2c702961975dfd78c75183a335ddd441267e1e6168ceda11ea47f47ad59fdee394e917ff0ddf6de1aa2
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.16.0.
|
1
|
+
0.16.0.rc3
|
@@ -40,9 +40,13 @@ module Kontena
|
|
40
40
|
puts "You don't seem to be logged in to Kontena Cloud"
|
41
41
|
puts
|
42
42
|
Kontena.run("cloud login --verbose")
|
43
|
+
config.reset_instance
|
44
|
+
reset_cloud_client
|
45
|
+
result = false
|
43
46
|
Retriable.retriable do
|
44
|
-
cloud_client.authentication_ok?(kontena_account.userinfo_endpoint)
|
47
|
+
result = cloud_client.authentication_ok?(kontena_account.userinfo_endpoint)
|
45
48
|
end
|
49
|
+
result
|
46
50
|
end
|
47
51
|
|
48
52
|
def before
|
@@ -112,6 +112,8 @@ module Kontena::Cli::Cloud::Master
|
|
112
112
|
def execute
|
113
113
|
unless cloud_client.authentication_ok?(kontena_account.userinfo_endpoint)
|
114
114
|
Kontena.run('cloud login')
|
115
|
+
config.reset_instance
|
116
|
+
reset_cloud_client
|
115
117
|
end
|
116
118
|
|
117
119
|
return register_current if self.current?
|
data/lib/kontena/cli/common.rb
CHANGED
@@ -166,6 +166,10 @@ module Kontena
|
|
166
166
|
@cloud_client ||= Kontena::Client.new(kontena_account.url, kontena_account.token, prefix: '/')
|
167
167
|
end
|
168
168
|
|
169
|
+
def reset_cloud_client
|
170
|
+
@cloud_client = nil
|
171
|
+
end
|
172
|
+
|
169
173
|
def client(token = nil, api_url = nil)
|
170
174
|
if token.kind_of?(String)
|
171
175
|
token = Kontena::Cli::Config::Token.new(access_token: token)
|
data/lib/kontena/cli/config.rb
CHANGED
@@ -108,7 +108,7 @@ module Kontena::Cli::Master
|
|
108
108
|
if self.token
|
109
109
|
# Use supplied token
|
110
110
|
server.token = Kontena::Cli::Config::Token.new(access_token: self.token, parent_type: :master, parent_name: server.name)
|
111
|
-
elsif server.token.nil?
|
111
|
+
elsif server.token.nil? || self.force?
|
112
112
|
# Create new empty token if the server does not have one yet
|
113
113
|
server.token = Kontena::Cli::Config::Token.new(parent_type: :master, parent_name: server.name)
|
114
114
|
end
|