hula 0.9.2 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hula/bosh_director.rb +21 -4
- data/lib/hula/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c29bfa90e4fa55109dbad00d8389c432e1c3ced
|
4
|
+
data.tar.gz: 8e426bad601bc2a135e68d05e5e066c186d33915
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06a3bfcea1e42846a7ae1d87ac719b6ace1eb1f13c64506769ee4ef6b1a62b1d6f9807660bd52ea61cab1c4d5f086602bd724d4d2f04b0127a24926360a0e01f
|
7
|
+
data.tar.gz: 8f71da5ca2c955035bbeeaf7a7ba9068d72476e0b7c7ff172fd313425e6fa7a9704365155acbaa45e12ad893d224152bd5ab747985c754513f606d3a0226573c
|
data/lib/hula/bosh_director.rb
CHANGED
@@ -27,7 +27,9 @@ module Hula
|
|
27
27
|
password:,
|
28
28
|
manifest_path: nil,
|
29
29
|
command_runner: CommandRunner.new,
|
30
|
-
logger: default_logger
|
30
|
+
logger: default_logger,
|
31
|
+
certificate_path: nil,
|
32
|
+
env_login: false
|
31
33
|
)
|
32
34
|
@target_url = target_url
|
33
35
|
@username = username
|
@@ -35,6 +37,8 @@ module Hula
|
|
35
37
|
@default_manifest_path = manifest_path
|
36
38
|
@command_runner = command_runner
|
37
39
|
@logger = logger
|
40
|
+
@certificate_path = certificate_path
|
41
|
+
@env_login = env_login
|
38
42
|
|
39
43
|
target_and_login
|
40
44
|
end
|
@@ -178,7 +182,8 @@ module Hula
|
|
178
182
|
|
179
183
|
private
|
180
184
|
|
181
|
-
attr_reader :target_url, :username, :password, :command_runner, :logger
|
185
|
+
attr_reader :target_url, :username, :password, :command_runner, :logger,
|
186
|
+
:certificate_path, :env_login
|
182
187
|
|
183
188
|
def job_properties(job_name)
|
184
189
|
if manifest.has_key?('instance_groups')
|
@@ -219,9 +224,21 @@ module Hula
|
|
219
224
|
end
|
220
225
|
|
221
226
|
def target_and_login
|
222
|
-
|
227
|
+
target_cmd = "target #{target_url}"
|
228
|
+
if certificate_path
|
229
|
+
target_cmd = "--ca-cert #{certificate_path} #{target_cmd}"
|
230
|
+
end
|
231
|
+
|
232
|
+
run_bosh(target_cmd)
|
223
233
|
run_bosh("deployment #{default_manifest_path}") if default_manifest_path?
|
224
|
-
|
234
|
+
|
235
|
+
if not env_login
|
236
|
+
run_bosh("login #{username} #{password}")
|
237
|
+
else
|
238
|
+
if not ENV.has_key? 'BOSH_CLIENT' or not ENV.has_key? 'BOSH_CLIENT_SECRET'
|
239
|
+
raise 'BOSH_CLIENT and BOSH_CLIENT_SECRET must both be set in the ENV'
|
240
|
+
end
|
241
|
+
end
|
225
242
|
end
|
226
243
|
|
227
244
|
def run_bosh(cmd)
|
data/lib/hula/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hula
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Will Pragnell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|