bosh_cli 1.2789.0 → 1.2792.0
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.
- data/lib/cli/base_command.rb +1 -1
- data/lib/cli/blob_manager.rb +8 -3
- data/lib/cli/commands/release/create_release.rb +1 -1
- data/lib/cli/commands/release/upload_release.rb +1 -1
- data/lib/cli/release.rb +13 -2
- data/lib/cli/version.rb +1 -1
- metadata +10 -10
data/lib/cli/base_command.rb
CHANGED
data/lib/cli/blob_manager.rb
CHANGED
@@ -45,9 +45,6 @@ module Bosh::Cli
|
|
45
45
|
end
|
46
46
|
|
47
47
|
@blobstore = @release.blobstore
|
48
|
-
if @blobstore.nil?
|
49
|
-
err("Blobstore is not configured")
|
50
|
-
end
|
51
48
|
|
52
49
|
@new_blobs = []
|
53
50
|
@updated_blobs = []
|
@@ -237,6 +234,10 @@ module Bosh::Cli
|
|
237
234
|
# Uploads blob to a blobstore, updates blobs index.
|
238
235
|
# @param [String] path Blob path relative to blobs dir
|
239
236
|
def upload_blob(path)
|
237
|
+
if @blobstore.nil?
|
238
|
+
err("Failed to upload blobs: blobstore not configured")
|
239
|
+
end
|
240
|
+
|
240
241
|
blob_path = File.join(@blobs_dir, path)
|
241
242
|
|
242
243
|
unless File.exists?(blob_path)
|
@@ -267,6 +268,10 @@ module Bosh::Cli
|
|
267
268
|
# Downloads blob from a blobstore
|
268
269
|
# @param [String] path Downloaded blob file path
|
269
270
|
def download_blob(path)
|
271
|
+
if @blobstore.nil?
|
272
|
+
err("Failed to download blobs: blobstore not configured")
|
273
|
+
end
|
274
|
+
|
270
275
|
unless @index.has_key?(path)
|
271
276
|
err("Unknown blob path `#{path}'")
|
272
277
|
end
|
@@ -63,7 +63,7 @@ module Bosh::Cli::Command
|
|
63
63
|
manifest_only = !options[:with_tarball]
|
64
64
|
dry_run = options[:dry_run]
|
65
65
|
|
66
|
-
|
66
|
+
release.blobstore # prime & validate blobstore config
|
67
67
|
|
68
68
|
dirty_blob_check(force)
|
69
69
|
|
data/lib/cli/release.rb
CHANGED
@@ -7,8 +7,10 @@ module Bosh::Cli
|
|
7
7
|
class Release
|
8
8
|
attr_reader :dir
|
9
9
|
|
10
|
-
def initialize(dir)
|
10
|
+
def initialize(dir, final = false)
|
11
11
|
@dir = dir
|
12
|
+
@final = final
|
13
|
+
|
12
14
|
config_dir = File.join(dir, "config")
|
13
15
|
@final_config_file = File.join(config_dir, "final.yml")
|
14
16
|
@dev_config_file = File.join(config_dir, "dev.yml")
|
@@ -62,6 +64,8 @@ module Bosh::Cli
|
|
62
64
|
def has_blobstore_secret?
|
63
65
|
bs = @private_config["blobstore"]
|
64
66
|
|
67
|
+
return false unless @final_config['blobstore']
|
68
|
+
|
65
69
|
# Add special handling for local blobstore which should not need need credentials
|
66
70
|
provider = @final_config['blobstore']['provider']
|
67
71
|
return true if provider == 'local'
|
@@ -99,7 +103,12 @@ module Bosh::Cli
|
|
99
103
|
blobstore_config = Marshal.load(Marshal.dump(@final_config["blobstore"]))
|
100
104
|
|
101
105
|
if blobstore_config.nil?
|
102
|
-
err("Missing blobstore configuration, please update
|
106
|
+
err("Missing blobstore configuration, please update config/final.yml") if @final
|
107
|
+
unless @user_warned
|
108
|
+
warning("Missing blobstore configuration, please update config/final.yml before making a final release")
|
109
|
+
@user_warned = true
|
110
|
+
end
|
111
|
+
return nil
|
103
112
|
end
|
104
113
|
|
105
114
|
provider = blobstore_config["provider"]
|
@@ -134,6 +143,8 @@ module Bosh::Cli
|
|
134
143
|
# Extracts private blobstore data from final.yml (i.e. secrets)
|
135
144
|
# and merges it into the blobstore options.
|
136
145
|
def merge_private_data(provider, options)
|
146
|
+
err("Missing blobstore secret configuration, please update config/private.yml") if @final && !has_blobstore_secret?
|
147
|
+
|
137
148
|
bs = @private_config["blobstore"]
|
138
149
|
return options unless bs
|
139
150
|
|
data/lib/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bosh_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2792.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-12-
|
12
|
+
date: 2014-12-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bosh_common
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.
|
21
|
+
version: 1.2792.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.
|
29
|
+
version: 1.2792.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: bosh-template
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -34,7 +34,7 @@ dependencies:
|
|
34
34
|
requirements:
|
35
35
|
- - ~>
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version: 1.
|
37
|
+
version: 1.2792.0
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - ~>
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 1.
|
45
|
+
version: 1.2792.0
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: json_pure
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -130,7 +130,7 @@ dependencies:
|
|
130
130
|
requirements:
|
131
131
|
- - ~>
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version: 1.
|
133
|
+
version: 1.2792.0
|
134
134
|
type: :runtime
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -138,7 +138,7 @@ dependencies:
|
|
138
138
|
requirements:
|
139
139
|
- - ~>
|
140
140
|
- !ruby/object:Gem::Version
|
141
|
-
version: 1.
|
141
|
+
version: 1.2792.0
|
142
142
|
- !ruby/object:Gem::Dependency
|
143
143
|
name: net-ssh
|
144
144
|
requirement: !ruby/object:Gem::Requirement
|
@@ -221,7 +221,7 @@ dependencies:
|
|
221
221
|
version: 0.5.4
|
222
222
|
description: ! 'BOSH CLI
|
223
223
|
|
224
|
-
|
224
|
+
5e7f33'
|
225
225
|
email: support@cloudfoundry.com
|
226
226
|
executables:
|
227
227
|
- bosh
|
@@ -344,7 +344,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
344
344
|
version: '0'
|
345
345
|
segments:
|
346
346
|
- 0
|
347
|
-
hash:
|
347
|
+
hash: -1339837986300098617
|
348
348
|
requirements: []
|
349
349
|
rubyforge_project:
|
350
350
|
rubygems_version: 1.8.23
|