Skip to content
This repository has been archived by the owner on Nov 29, 2017. It is now read-only.

Commit

Permalink
Setup the default branch "staging" in generate_generatable_options
Browse files Browse the repository at this point in the history
  • Loading branch information
drnic committed Feb 12, 2013
1 parent da7201c commit 8bc15e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions lib/bosh/cli/commands/cf.rb
Expand Up @@ -127,7 +127,7 @@ def upload_stemcell

usage "cf upload release"
desc "fetch & upload latest public cloudfoundry release to BOSH"
option "--branch", String, "Create development release from branch of cf-release [default: staging]"
option "--branch branch", String, "Create development release from branch of cf-release [default: staging]"
option "--final", "Upload latest final release from very latest cf-release commits"
def upload_release
if options.delete(:final)
Expand All @@ -136,8 +136,9 @@ def upload_release
else
# FUTURE once all patches from https://github.com/StarkAndWayne/bosh-cloudfoundry/issues/42
# are merged into cf-release, then no more gerrit merging required
branch = options[:branch] || "staging"
set_cf_release_branch(branch)
if new_branch = options.delete(:branch)
set_cf_release_branch(new_branch)
end
clone_or_update_cf_release
create_and_upload_dev_release
end
Expand Down Expand Up @@ -534,6 +535,8 @@ def validate_compute_flavor(flavor)
def generate_generatable_options
common_password
security_group

set_cf_release_branch("staging")
end

# Renders the +SystemConfig+ model (+system_config+) into the system's
Expand Down
4 changes: 2 additions & 2 deletions spec/unit/cf_command_spec.rb
Expand Up @@ -127,7 +127,7 @@
# @cmd.should_receive(:sh).with("sed -i 's#git@github.com:#https://github.com/#g' .gitmodules")
# @cmd.should_receive(:sh).with("sed -i 's#git://github.com#https://github.com#g' .gitmodules")
# @cmd.should_receive(:sh).with("git submodule update --init --recursive")
# @cmd.should_receive(:write_dev_config_file).with("appcloud-dev")
# @cmd.should_receive(:write_dev_config_file).with("appcloud-staging")
# @cmd.should_receive(:sh).with("bosh create release --with-tarball --force")
# @cmd.should_receive(:sh).with("bosh -n --color upload release")
# @cmd.upload_release
Expand Down Expand Up @@ -199,7 +199,7 @@ def generate_new_system(cmd = nil)
it "temporarily uploads latest stemcell & patched cf-release by default" do
generate_new_system(@cmd)
File.basename(@cmd.system).should == "production"
@cmd.system_config.release_name.should == "appcloud-dev"
@cmd.system_config.release_name.should == "appcloud-staging"
end

it "new system has common random password" do
Expand Down

0 comments on commit 8bc15e0

Please sign in to comment.