dapp 0.28.7 → 0.28.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dapp/dapp.rb +6 -1
- data/lib/dapp/version.rb +1 -1
- metadata +3 -4
- data/lib/dapp/kube/kubernetes/config.rb +0 -50
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee999b23848508702ffc95efbf16a04c271189c7
|
4
|
+
data.tar.gz: 99f8b08ee3fe467bc81c097993e811cd4c9e6d64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4192c9469d4a5755a06c81a2d1da08d3ec9c8234d1f00c2c3f6c0d6aa187d017faffbac2d5fbe007dcee5f9562cd191d072a818da780ce2e2e85af535c670ee5
|
7
|
+
data.tar.gz: 19bb47fd74662556160ad655390e76c705f379eef9a7d7abf82771220f978040b6daca9083ec232cd57e1fde7f2db00aabb6bc45ddc992237a81f12411cb86db
|
data/lib/dapp/dapp.rb
CHANGED
@@ -164,8 +164,13 @@ module Dapp
|
|
164
164
|
|
165
165
|
def host_docker_login(repo)
|
166
166
|
return unless self.class.options_with_docker_credentials?
|
167
|
+
|
167
168
|
username, password = self.class.docker_credentials
|
168
|
-
|
169
|
+
if ::Dapp::Dapp.host_docker_minor_version >= Gem::Version.new('17.07')
|
170
|
+
shellout!("#{host_docker} login --username '#{username}' --password-stdin '#{repo}'", input: password)
|
171
|
+
else
|
172
|
+
shellout!("#{host_docker} login --username '#{username}' --password '#{password}' '#{repo}'")
|
173
|
+
end
|
169
174
|
end
|
170
175
|
|
171
176
|
class << self
|
data/lib/dapp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.28.
|
4
|
+
version: 0.28.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Stolyarov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-shellout
|
@@ -744,7 +744,6 @@ files:
|
|
744
744
|
- lib/dapp/kube/kubernetes/client/resource/job.rb
|
745
745
|
- lib/dapp/kube/kubernetes/client/resource/pod.rb
|
746
746
|
- lib/dapp/kube/kubernetes/client/resource/replicaset.rb
|
747
|
-
- lib/dapp/kube/kubernetes/config.rb
|
748
747
|
- lib/dapp/kube/kubernetes/error.rb
|
749
748
|
- lib/dapp/kube/kubernetes/manager/base.rb
|
750
749
|
- lib/dapp/kube/kubernetes/manager/container.rb
|
@@ -774,7 +773,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
774
773
|
version: 2.5.0
|
775
774
|
requirements: []
|
776
775
|
rubyforge_project:
|
777
|
-
rubygems_version: 2.
|
776
|
+
rubygems_version: 2.6.11
|
778
777
|
signing_key:
|
779
778
|
specification_version: 4
|
780
779
|
summary: Build docker packaged apps using chef or shell
|
@@ -1,50 +0,0 @@
|
|
1
|
-
module Dapp
|
2
|
-
module Kube
|
3
|
-
module Kubernetes
|
4
|
-
class Config
|
5
|
-
extend Helper::YAML
|
6
|
-
|
7
|
-
class << self
|
8
|
-
def new_from_kubeconfig(path)
|
9
|
-
self.new yaml_load_file(path)
|
10
|
-
end
|
11
|
-
|
12
|
-
def new_from_kubectl
|
13
|
-
# TODO
|
14
|
-
end
|
15
|
-
end # << self
|
16
|
-
|
17
|
-
attr_reader :config_hash
|
18
|
-
|
19
|
-
def initialize(config_hash)
|
20
|
-
@config_hash = config_hash
|
21
|
-
end
|
22
|
-
|
23
|
-
def current_context_name
|
24
|
-
config_hash['current-context'] || begin
|
25
|
-
if (context = kube_config.fetch('contexts', []).first)
|
26
|
-
warn "[WARN] .kube/config current-context is not set, using context '#{context['name']}'"
|
27
|
-
context['name']
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
def context_config(context_name)
|
33
|
-
config_hash.fetch('contexts', []).find {|context| context['name'] == context_name}
|
34
|
-
end
|
35
|
-
|
36
|
-
def user_config(user_name)
|
37
|
-
config_hash.fetch('users', []).find {|user| user['name'] == user_name}
|
38
|
-
end
|
39
|
-
|
40
|
-
def cluster_config(cluster_name)
|
41
|
-
config_hash.fetch('clusters', []).find {|cluster| cluster['name'] == cluster_name}
|
42
|
-
end
|
43
|
-
|
44
|
-
def context_namespace(context_config)
|
45
|
-
context_config['context']['namespace']
|
46
|
-
end
|
47
|
-
end # Kubeconfig
|
48
|
-
end # Kubernetes
|
49
|
-
end # Kube
|
50
|
-
end # Dapp
|