bosh-cloudfoundry 0.5.0 → 0.5.1
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/ChangeLog.md +4 -0
- data/lib/bosh-cloudfoundry.rb +0 -1
- data/lib/bosh-cloudfoundry/bosh_release_manager.rb +6 -6
- data/lib/bosh-cloudfoundry/version.rb +1 -1
- data/lib/bosh/cli/commands/cf.rb +0 -1
- data/spec/unit/bosh_release_manager_spec.rb +2 -2
- metadata +3 -4
- data/lib/bosh-cloudfoundry/gerrit_patches_helper.rb +0 -47
data/ChangeLog.md
CHANGED
@@ -12,6 +12,10 @@ In future, when cf-release eventually merges all the required patches into maste
|
|
12
12
|
|
13
13
|
And finally, the big requirement for going v1.0, is for all the required patches to be included in a final release of cf-release.
|
14
14
|
|
15
|
+
### v0.5.1
|
16
|
+
|
17
|
+
Fixes a bug in creating dev releases of cf-release based on branches that aren't "master". It now correctly clones each staging branch into its own repository, built solely off the targeted branch.
|
18
|
+
|
15
19
|
## v0.4
|
16
20
|
|
17
21
|
Defaults to patched dev release (since a cf-release final release doesn't work).
|
data/lib/bosh-cloudfoundry.rb
CHANGED
@@ -26,7 +26,6 @@ require 'fog/aws/models/compute/flavors'
|
|
26
26
|
# CLI mixins
|
27
27
|
require "bosh-cloudfoundry/config_options"
|
28
28
|
require "bosh-cloudfoundry/bosh_release_manager"
|
29
|
-
require "bosh-cloudfoundry/gerrit_patches_helper"
|
30
29
|
|
31
30
|
require "bosh-cloudfoundry/config"
|
32
31
|
require "bosh-cloudfoundry/providers"
|
@@ -43,7 +43,7 @@ module Bosh::CloudFoundry::BoshReleaseManager
|
|
43
43
|
release_number = use_latest_release? ?
|
44
44
|
latest_uploadable_final_release_number :
|
45
45
|
release_version
|
46
|
-
chdir(
|
46
|
+
chdir(cf_release_branch_dir) do
|
47
47
|
bosh_cmd "upload release releases/appcloud-#{release_number}.yml"
|
48
48
|
end
|
49
49
|
@bosh_releases = nil # reset cache
|
@@ -53,7 +53,7 @@ module Bosh::CloudFoundry::BoshReleaseManager
|
|
53
53
|
# for the latest release number that could be uploaded
|
54
54
|
# @returns [String] a number such as "126"
|
55
55
|
def latest_uploadable_final_release_number
|
56
|
-
chdir(
|
56
|
+
chdir(cf_release_branch_dir) do
|
57
57
|
return `tail -n 1 releases/index.yml | awk '{print $2}'`.strip
|
58
58
|
end
|
59
59
|
end
|
@@ -62,7 +62,7 @@ module Bosh::CloudFoundry::BoshReleaseManager
|
|
62
62
|
# for the latest release number that could be uploaded
|
63
63
|
# @returns [String] a dev release code such as "126.8-dev"
|
64
64
|
def latest_uploadable_dev_release_number
|
65
|
-
chdir(
|
65
|
+
chdir(cf_release_branch_dir) do
|
66
66
|
return `tail -n 1 dev_releases/index.yml | awk '{print $2}'`.strip
|
67
67
|
end
|
68
68
|
end
|
@@ -76,7 +76,7 @@ module Bosh::CloudFoundry::BoshReleaseManager
|
|
76
76
|
|
77
77
|
def create_and_upload_dev_release
|
78
78
|
release_name = default_dev_release_name
|
79
|
-
chdir(
|
79
|
+
chdir(cf_release_branch_dir) do
|
80
80
|
write_dev_config_file(release_name)
|
81
81
|
sh "bosh -n --color create release --with-tarball --force"
|
82
82
|
sh "bosh -n --color upload release"
|
@@ -107,11 +107,11 @@ module Bosh::CloudFoundry::BoshReleaseManager
|
|
107
107
|
raise "invoke #set_cf_release_branch(branch) first" unless cf_release_branch_dir
|
108
108
|
if File.directory?(cf_release_branch_dir)
|
109
109
|
chdir(cf_release_branch_dir) do
|
110
|
-
sh "git pull origin #{cf_release_branch}
|
110
|
+
sh "git pull origin #{cf_release_branch}" # recursive is below
|
111
111
|
end
|
112
112
|
else
|
113
113
|
chdir(releases_dir) do
|
114
|
-
sh "git clone #{cf_release_git_repo} #{cf_release_branch_dir}"
|
114
|
+
sh "git clone -b #{cf_release_branch} #{cf_release_git_repo} #{cf_release_branch_dir}"
|
115
115
|
chdir(cf_release_branch_dir) do
|
116
116
|
sh "git update-index --assume-unchanged config/final.yml 2>/dev/null"
|
117
117
|
end
|
data/lib/bosh/cli/commands/cf.rb
CHANGED
@@ -22,7 +22,7 @@ describe Bosh::CloudFoundry::BoshReleaseManager do
|
|
22
22
|
self.cf_release_branch = "master"
|
23
23
|
self.cf_release_branch_dir = File.join(cf_release_dir, "master")
|
24
24
|
mkdir_p(cf_release_branch_dir)
|
25
|
-
should_receive(:sh).with("git pull origin master
|
25
|
+
should_receive(:sh).with("git pull origin master")
|
26
26
|
should_receive(:sh).with("sed -i 's#git@github.com:#https://github.com/#g' .gitmodules")
|
27
27
|
should_receive(:sh).with("sed -i 's#git://github.com#https://github.com#g' .gitmodules")
|
28
28
|
should_receive(:sh).with("git submodule update --init --recursive")
|
@@ -33,7 +33,7 @@ describe Bosh::CloudFoundry::BoshReleaseManager do
|
|
33
33
|
self.cf_release_branch = "staging"
|
34
34
|
self.cf_release_branch_dir = File.join(cf_release_dir, "staging")
|
35
35
|
mkdir_p(cf_release_branch_dir)
|
36
|
-
should_receive(:sh).with("git pull origin staging
|
36
|
+
should_receive(:sh).with("git pull origin staging")
|
37
37
|
should_receive(:sh).with("sed -i 's#git@github.com:#https://github.com/#g' .gitmodules")
|
38
38
|
should_receive(:sh).with("sed -i 's#git://github.com#https://github.com#g' .gitmodules")
|
39
39
|
should_receive(:sh).with("git submodule update --init --recursive")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bosh-cloudfoundry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -119,7 +119,6 @@ files:
|
|
119
119
|
- lib/bosh-cloudfoundry/config/redis_service_config.rb
|
120
120
|
- lib/bosh-cloudfoundry/config/system_config.rb
|
121
121
|
- lib/bosh-cloudfoundry/config_options.rb
|
122
|
-
- lib/bosh-cloudfoundry/gerrit_patches_helper.rb
|
123
122
|
- lib/bosh-cloudfoundry/providers.rb
|
124
123
|
- lib/bosh-cloudfoundry/providers/aws.rb
|
125
124
|
- lib/bosh-cloudfoundry/providers/openstack.rb
|
@@ -161,7 +160,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
161
160
|
version: '0'
|
162
161
|
segments:
|
163
162
|
- 0
|
164
|
-
hash:
|
163
|
+
hash: -2872187592937084659
|
165
164
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
166
165
|
none: false
|
167
166
|
requirements:
|
@@ -170,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
170
169
|
version: '0'
|
171
170
|
segments:
|
172
171
|
- 0
|
173
|
-
hash:
|
172
|
+
hash: -2872187592937084659
|
174
173
|
requirements: []
|
175
174
|
rubyforge_project:
|
176
175
|
rubygems_version: 1.8.24
|
@@ -1,47 +0,0 @@
|
|
1
|
-
# Copyright (c) 2012-2013 Stark & Wayne, LLC
|
2
|
-
|
3
|
-
module Bosh; module CloudFoundry; end; end
|
4
|
-
|
5
|
-
# There are two concepts of "latest".
|
6
|
-
# * for upload: "latest" is the highest release in cf-release
|
7
|
-
# * for manifest creation: "latest" is the highest release already uploaded to the BOSH
|
8
|
-
module Bosh::CloudFoundry::GerritPatchesHelper
|
9
|
-
|
10
|
-
def extract_refs_change(gerrit_change)
|
11
|
-
if gerrit_change =~ %r{(\d+)/(\d+)/(\d+)$}
|
12
|
-
"#{$1}/#{$2}/#{$3}"
|
13
|
-
else
|
14
|
-
nil
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def add_gerrit_refs_change(refs_change)
|
19
|
-
system_config.gerrit_changes ||= []
|
20
|
-
unless system_config.gerrit_changes.include?(refs_change)
|
21
|
-
system_config.gerrit_changes << refs_change
|
22
|
-
system_config.save
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
def apply_gerrit_patches
|
27
|
-
# is the gerrit setup necessary; or can use anonymous HTTP?
|
28
|
-
# confirm_gerrit_username # http://reviews.cloudfoundry.org/#/settings/
|
29
|
-
# confirm_user_added_vcap_ssh_keys_to_gerrit # http://reviews.cloudfoundry.org/#/settings/ssh-keys
|
30
|
-
# confirm_ssh_access # ssh -p 29418 drnic@reviews.cloudfoundry.org 2>&1 | grep "Permission denied"
|
31
|
-
create_and_change_into_patches_branch
|
32
|
-
ssh_uri = "http://reviews.cloudfoundry.org/cf-release"
|
33
|
-
chdir(cf_release_dir) do
|
34
|
-
system_config.gerrit_changes.each do |refs_change|
|
35
|
-
sh "git pull #{ssh_uri} refs/changes/#{refs_change}"
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
def create_and_change_into_patches_branch
|
41
|
-
chdir(cf_release_dir) do
|
42
|
-
sh "git checkout master"
|
43
|
-
sh "git branch -f patches" # force create
|
44
|
-
sh "git checkout patches"
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|