Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

publish stemcells and gems to S3 only after successful BAT run

  • Loading branch information...
commit 48d97185cc680bbc9a50706ce3b59beb20fceb9d 1 parent 971bd69
Alex Jackson, Jeffrey Peckham and Martin Englund authored
Showing with 298 additions and 187 deletions.
  1. +1 −1  BOSH_VERSION
  2. +0 −7 Gemfile
  3. +61 −103 Gemfile.lock
  4. +1 −1  agent_client/lib/agent_client/version.rb
  5. +1 −1  blobstore_client/lib/blobstore_client/version.rb
  6. +1 −1  bosh_agent/lib/bosh_agent/version.rb
  7. +1 −1  bosh_aws_bootstrap/lib/bosh_aws_bootstrap/version.rb
  8. +1 −1  bosh_aws_cpi/lib/cloud/aws/version.rb
  9. +1 −1  bosh_cli/lib/cli/version.rb
  10. +1 −1  bosh_common/lib/common/version.rb
  11. +1 −1  bosh_cpi/lib/cloud/version.rb
  12. +1 −1  bosh_deployer/lib/deployer/version.rb
  13. +1 −1  bosh_encryption/lib/encryption/version.rb
  14. +1 −1  bosh_openstack_cpi/lib/cloud/openstack/version.rb
  15. +1 −1  bosh_registry/lib/bosh_registry/version.rb
  16. +1 −1  bosh_vcloud_cpi/lib/cloud/vcloud/version.rb
  17. +1 −1  bosh_vsphere_cpi/lib/cloud/vsphere/version.rb
  18. +1 −1  director/lib/director/version.rb
  19. +1 −1  health_monitor/lib/health_monitor/version.rb
  20. +1 −1  monit_api/lib/monit_api/version.rb
  21. +1 −1  package_compiler/lib/package_compiler/version.rb
  22. +16 −9 rake/gem.rake
  23. +121 −3 rake/spec.rake
  24. +76 −0 rake/stemcell.rake
  25. +1 −1  ruby_vcloud_sdk/lib/ruby_vcloud_sdk/version.rb
  26. +1 −1  ruby_vim_sdk/lib/ruby_vim_sdk/version.rb
  27. +1 −1  simple_blobstore_server/lib/simple_blobstore_server/version.rb
  28. +1 −10 spec/ci_build_stemcell.sh
  29. +1 −1  spec/support/aws_example_group.rb
  30. +0 −32 spec/system/aws/micro_bosh_spec.rb
  31. BIN  vendor/cache/caldecott-client-0.0.2.gem
  32. BIN  vendor/cache/cf-uaa-lib-1.3.7.gem
  33. BIN  vendor/cache/cfoundry-0.5.2.gem
  34. BIN  vendor/cache/clouseau-0.0.2.gem
  35. BIN  vendor/cache/interact-0.5.2.gem
  36. BIN  vendor/cache/manifests-vmc-plugin-0.6.2.gem
  37. BIN  vendor/cache/mothership-0.5.1.gem
  38. BIN  vendor/cache/multipart-post-1.2.0.gem
  39. BIN  vendor/cache/rubyzip-0.9.9.gem
  40. BIN  vendor/cache/tunnel-vmc-plugin-0.2.2.gem
  41. BIN  vendor/cache/vmc-0.5.0.gem
View
2  BOSH_VERSION
@@ -1 +1 @@
-1.5.0.pre2
+1.5.0.pre.3
View
7 Gemfile
@@ -67,11 +67,4 @@ group :development, :test do
gem "nokogiri-diff"
gem "sqlite3"
-
- gem "bootstrap-vmc-plugin", :github => "cloudfoundry/bootstrap-vmc-plugin"
- gem "vmc", "~> 0.5.0"
-
- # gem "guard-yard"
- # gem "redcarpet"
- # gem "rb-fsevent"
end
View
164 Gemfile.lock
@@ -1,24 +1,16 @@
-GIT
- remote: git://github.com/cloudfoundry/bootstrap-vmc-plugin.git
- revision: ccafed61f67214b8930316a82f7ecc7c067098bf
- specs:
- bootstrap-vmc-plugin (0.0.1)
- bosh_aws_bootstrap (= 1.5.0.pre2)
- vmc (~> 0.5)
-
PATH
remote: agent_client
specs:
- agent_client (1.5.0.pre2)
+ agent_client (1.5.0.pre.3)
httpclient (= 2.2.4)
yajl-ruby (~> 1.1.0)
PATH
remote: blobstore_client
specs:
- blobstore_client (1.5.0.pre2)
+ blobstore_client (1.5.0.pre.3)
aws-sdk (= 1.8.5)
- bosh_common (~> 1.5.0.pre2)
+ bosh_common (~> 1.5.0.pre.3)
fog (~> 1.10.0)
httpclient (= 2.2.4)
multi_json (~> 1.1)
@@ -27,13 +19,13 @@ PATH
PATH
remote: bosh_agent
specs:
- bosh_agent (1.5.0.pre2)
- blobstore_client (~> 1.5.0.pre2)
- bosh_common (~> 1.5.0.pre2)
- bosh_encryption (~> 1.5.0.pre2)
+ bosh_agent (1.5.0.pre.3)
+ blobstore_client (~> 1.5.0.pre.3)
+ bosh_common (~> 1.5.0.pre.3)
+ bosh_encryption (~> 1.5.0.pre.3)
highline (~> 1.6.2)
httpclient (= 2.2.4)
- monit_api (~> 1.5.0.pre2)
+ monit_api (~> 1.5.0.pre.3)
nats (~> 0.4.28)
netaddr (~> 1.5.0)
posix-spawn (~> 0.3.6)
@@ -47,28 +39,28 @@ PATH
PATH
remote: bosh_aws_bootstrap
specs:
- bosh_aws_bootstrap (1.5.0.pre2)
- bosh_aws_cpi (~> 1.5.0.pre2)
- bosh_cli (~> 1.5.0.pre2)
- bosh_deployer (~> 1.5.0.pre2)
+ bosh_aws_bootstrap (1.5.0.pre.3)
+ bosh_aws_cpi (~> 1.5.0.pre.3)
+ bosh_cli (~> 1.5.0.pre.3)
+ bosh_deployer (~> 1.5.0.pre.3)
PATH
remote: bosh_aws_cpi
specs:
- bosh_aws_cpi (1.5.0.pre2)
+ bosh_aws_cpi (1.5.0.pre.3)
aws-sdk (= 1.8.5)
- bosh_common (~> 1.5.0.pre2)
- bosh_cpi (~> 1.5.0.pre2)
+ bosh_common (~> 1.5.0.pre.3)
+ bosh_cpi (~> 1.5.0.pre.3)
httpclient (= 2.2.4)
yajl-ruby (>= 0.8.2)
PATH
remote: bosh_cli
specs:
- bosh_cli (1.5.0.pre2)
+ bosh_cli (1.5.0.pre.3)
archive-tar-minitar (~> 0.5)
- blobstore_client (~> 1.5.0.pre2)
- bosh_common (~> 1.5.0.pre2)
+ blobstore_client (~> 1.5.0.pre.3)
+ bosh_common (~> 1.5.0.pre.3)
highline (~> 1.6.2)
httpclient (= 2.2.4)
json_pure (~> 1.7.6)
@@ -82,41 +74,41 @@ PATH
PATH
remote: bosh_common
specs:
- bosh_common (1.5.0.pre2)
+ bosh_common (1.5.0.pre.3)
PATH
remote: bosh_cpi
specs:
- bosh_cpi (1.5.0.pre2)
- bosh_common (~> 1.5.0.pre2)
+ bosh_cpi (1.5.0.pre.3)
+ bosh_common (~> 1.5.0.pre.3)
PATH
remote: bosh_deployer
specs:
- bosh_deployer (1.5.0.pre2)
- agent_client (~> 1.5.0.pre2)
- bosh_aws_cpi (~> 1.5.0.pre2)
- bosh_cli (~> 1.5.0.pre2)
- bosh_cpi (~> 1.5.0.pre2)
- bosh_openstack_cpi (~> 1.5.0.pre2)
- bosh_registry (~> 1.5.0.pre2)
- bosh_vcloud_cpi (~> 1.5.0.pre2)
- bosh_vsphere_cpi (~> 1.5.0.pre2)
+ bosh_deployer (1.5.0.pre.3)
+ agent_client (~> 1.5.0.pre.3)
+ bosh_aws_cpi (~> 1.5.0.pre.3)
+ bosh_cli (~> 1.5.0.pre.3)
+ bosh_cpi (~> 1.5.0.pre.3)
+ bosh_openstack_cpi (~> 1.5.0.pre.3)
+ bosh_registry (~> 1.5.0.pre.3)
+ bosh_vcloud_cpi (~> 1.5.0.pre.3)
+ bosh_vsphere_cpi (~> 1.5.0.pre.3)
sqlite3 (~> 1.3.7)
PATH
remote: bosh_encryption
specs:
- bosh_encryption (1.5.0.pre2)
+ bosh_encryption (1.5.0.pre.3)
gibberish (~> 1.2.0)
yajl-ruby (~> 1.1.0)
PATH
remote: bosh_openstack_cpi
specs:
- bosh_openstack_cpi (1.5.0.pre2)
- bosh_common (~> 1.5.0.pre2)
- bosh_cpi (~> 1.5.0.pre2)
+ bosh_openstack_cpi (1.5.0.pre.3)
+ bosh_common (~> 1.5.0.pre.3)
+ bosh_cpi (~> 1.5.0.pre.3)
fog (~> 1.10.0)
httpclient (= 2.2.4)
yajl-ruby (>= 0.8.2)
@@ -124,7 +116,7 @@ PATH
PATH
remote: bosh_registry
specs:
- bosh_registry (1.5.0.pre2)
+ bosh_registry (1.5.0.pre.3)
aws-sdk (= 1.8.5)
fog (~> 1.10.0)
sequel (~> 3.43.0)
@@ -135,35 +127,35 @@ PATH
PATH
remote: bosh_vcloud_cpi
specs:
- bosh_vcloud_cpi (1.5.0.pre2)
- bosh_common (~> 1.5.0.pre2)
- bosh_cpi (~> 1.5.0.pre2)
- ruby_vcloud_sdk (~> 1.5.0.pre2)
+ bosh_vcloud_cpi (1.5.0.pre.3)
+ bosh_common (~> 1.5.0.pre.3)
+ bosh_cpi (~> 1.5.0.pre.3)
+ ruby_vcloud_sdk (~> 1.5.0.pre.3)
yajl-ruby (>= 0.8.2)
PATH
remote: bosh_vsphere_cpi
specs:
- bosh_vsphere_cpi (1.5.0.pre2)
- bosh_common (~> 1.5.0.pre2)
- bosh_cpi (~> 1.5.0.pre2)
+ bosh_vsphere_cpi (1.5.0.pre.3)
+ bosh_common (~> 1.5.0.pre.3)
+ bosh_cpi (~> 1.5.0.pre.3)
membrane (~> 0.0.2)
- ruby_vim_sdk (~> 1.5.0.pre2)
+ ruby_vim_sdk (~> 1.5.0.pre.3)
sequel (~> 3.43.0)
PATH
remote: director
specs:
- director (1.5.0.pre2)
+ director (1.5.0.pre.3)
bcrypt-ruby (~> 3.0.1)
- blobstore_client (~> 1.5.0.pre2)
- bosh_aws_cpi (~> 1.5.0.pre2)
- bosh_common (~> 1.5.0.pre2)
- bosh_cpi (~> 1.5.0.pre2)
- bosh_encryption (~> 1.5.0.pre2)
- bosh_openstack_cpi (~> 1.5.0.pre2)
- bosh_vcloud_cpi (~> 1.5.0.pre2)
- bosh_vsphere_cpi (~> 1.5.0.pre2)
+ blobstore_client (~> 1.5.0.pre.3)
+ bosh_aws_cpi (~> 1.5.0.pre.3)
+ bosh_common (~> 1.5.0.pre.3)
+ bosh_cpi (~> 1.5.0.pre.3)
+ bosh_encryption (~> 1.5.0.pre.3)
+ bosh_openstack_cpi (~> 1.5.0.pre.3)
+ bosh_vcloud_cpi (~> 1.5.0.pre.3)
+ bosh_vsphere_cpi (~> 1.5.0.pre.3)
eventmachine (~> 0.12.9)
fog (~> 1.10.0)
httpclient (= 2.2.4)
@@ -181,7 +173,7 @@ PATH
PATH
remote: health_monitor
specs:
- health_monitor (1.5.0.pre2)
+ health_monitor (1.5.0.pre.3)
aws-sdk (= 1.8.5)
em-http-request (~> 0.3.0)
eventmachine (~> 0.12.10)
@@ -194,23 +186,23 @@ PATH
PATH
remote: monit_api
specs:
- monit_api (1.5.0.pre2)
+ monit_api (1.5.0.pre.3)
crack (~> 0.3.2)
PATH
remote: package_compiler
specs:
- package_compiler (1.5.0.pre2)
- agent_client (~> 1.5.0.pre2)
- blobstore_client (~> 1.5.0.pre2)
- bosh_common (~> 1.5.0.pre2)
+ package_compiler (1.5.0.pre.3)
+ agent_client (~> 1.5.0.pre.3)
+ blobstore_client (~> 1.5.0.pre.3)
+ bosh_common (~> 1.5.0.pre.3)
trollop (~> 1.16)
yajl-ruby (~> 1.1.0)
PATH
remote: ruby_vcloud_sdk
specs:
- ruby_vcloud_sdk (1.5.0.pre2)
+ ruby_vcloud_sdk (1.5.0.pre.3)
builder (~> 3.1.4)
httpclient (= 2.2.4)
nokogiri (~> 1.5.6)
@@ -219,7 +211,7 @@ PATH
PATH
remote: ruby_vim_sdk
specs:
- ruby_vim_sdk (1.5.0.pre2)
+ ruby_vim_sdk (1.5.0.pre.3)
builder (~> 3.1.4)
httpclient (= 2.2.4)
nokogiri (~> 1.5.6)
@@ -227,7 +219,7 @@ PATH
PATH
remote: simple_blobstore_server
specs:
- simple_blobstore_server (1.5.0.pre2)
+ simple_blobstore_server (1.5.0.pre.3)
sinatra (~> 1.2.8)
thin (~> 1.5.0)
@@ -243,19 +235,8 @@ GEM
backports (3.1.1)
bcrypt-ruby (3.0.1)
builder (3.1.4)
- caldecott-client (0.0.2)
- multi_json (~> 1.3)
- cf-uaa-lib (1.3.7)
- multi_json
- cfoundry (0.5.2)
- cf-uaa-lib (~> 1.3.3)
- multi_json (~> 1.3)
- multipart-post (~> 1.1)
- rubyzip (~> 0.9)
ci_reporter (1.8.4)
builder (>= 2.1.2)
- clouseau (0.0.2)
- rubyzip (~> 0.9.9)
coderay (1.0.9)
columnize (0.3.6)
crack (0.3.2)
@@ -302,7 +283,6 @@ GEM
rspec (~> 2.11)
highline (1.6.16)
httpclient (2.2.4)
- interact (0.5.2)
json (1.7.7)
json_pure (1.7.7)
listen (0.7.2)
@@ -312,15 +292,11 @@ GEM
little-plugger (>= 1.1.2)
lumberjack (1.0.2)
machinist (1.0.6)
- manifests-vmc-plugin (0.6.2)
- cfoundry (~> 0.5.2)
membrane (0.0.2)
method_source (0.8.1)
mime-types (1.21)
minitar (0.5.4)
- mothership (0.5.1)
multi_json (1.7.1)
- multipart-post (1.2.0)
nats (0.4.28)
daemons (>= 1.1.5)
eventmachine (= 0.12.10)
@@ -370,7 +346,6 @@ GEM
ruby-hmac (>= 0.4.0)
ruby-hmac (0.4.0)
ruby_gntp (0.3.4)
- rubyzip (0.9.9)
sequel (3.43.0)
sigar (0.7.2)
simplecov (0.7.1)
@@ -396,24 +371,9 @@ GEM
thor (0.17.0)
tilt (1.3.6)
trollop (1.16.2)
- tunnel-vmc-plugin (0.2.2)
- addressable (~> 2.2)
- caldecott-client (~> 0.0.2)
- cfoundry (~> 0.5.2)
- rest-client (~> 1.6)
- uuidtools (~> 2.1)
uuidtools (2.1.3)
vegas (0.1.11)
rack (>= 1.0.0)
- vmc (0.5.0)
- cfoundry (~> 0.5.2)
- clouseau (~> 0.0)
- interact (~> 0.5)
- json_pure (~> 1.6)
- manifests-vmc-plugin (~> 0.6.2)
- mothership (>= 0.5.1, < 1.0)
- multi_json (~> 1.3)
- tunnel-vmc-plugin (~> 0.2.2)
yajl-ruby (1.1.0)
PLATFORMS
@@ -422,7 +382,6 @@ PLATFORMS
DEPENDENCIES
agent_client!
blobstore_client!
- bootstrap-vmc-plugin!
bosh_agent!
bosh_aws_bootstrap!
bosh_aws_cpi!
@@ -464,4 +423,3 @@ DEPENDENCIES
simplecov
simplecov-rcov
sqlite3
- vmc (~> 0.5.0)
View
2  agent_client/lib/agent_client/version.rb
@@ -1,7 +1,7 @@
module Bosh
module Agent
class Client
- VERSION = '1.5.0.pre2'
+ VERSION = '1.5.0.pre.3'
end
end
end
View
2  blobstore_client/lib/blobstore_client/version.rb
@@ -3,7 +3,7 @@
module Bosh
module Blobstore
class Client
- VERSION = '1.5.0.pre2'
+ VERSION = '1.5.0.pre.3'
end
end
end
View
2  bosh_agent/lib/bosh_agent/version.rb
@@ -2,7 +2,7 @@
module Bosh
module Agent
- VERSION = '1.5.0.pre2'
+ VERSION = '1.5.0.pre.3'
BOSH_PROTOCOL = "1"
end
end
View
2  bosh_aws_bootstrap/lib/bosh_aws_bootstrap/version.rb
@@ -1,7 +1,7 @@
module Bosh
module Aws
module Bootstrap
- VERSION = '1.5.0.pre2'
+ VERSION = '1.5.0.pre.3'
end
end
end
View
2  bosh_aws_cpi/lib/cloud/aws/version.rb
@@ -2,6 +2,6 @@
module Bosh
module AwsCloud
- VERSION = '1.5.0.pre2'
+ VERSION = '1.5.0.pre.3'
end
end
View
2  bosh_cli/lib/cli/version.rb
@@ -2,6 +2,6 @@
module Bosh
module Cli
- VERSION = '1.5.0.pre2'
+ VERSION = '1.5.0.pre.3'
end
end
View
2  bosh_common/lib/common/version.rb
@@ -2,6 +2,6 @@
module Bosh
module Common
- VERSION = '1.5.0.pre2'
+ VERSION = '1.5.0.pre.3'
end
end
View
2  bosh_cpi/lib/cloud/version.rb
@@ -1,5 +1,5 @@
module Bosh
module Clouds
- VERSION = '1.5.0.pre2'
+ VERSION = '1.5.0.pre.3'
end
end
View
2  bosh_deployer/lib/deployer/version.rb
@@ -2,6 +2,6 @@
module Bosh
module Deployer
- VERSION = '1.5.0.pre2'
+ VERSION = '1.5.0.pre.3'
end
end
View
2  bosh_encryption/lib/encryption/version.rb
@@ -2,6 +2,6 @@
module Bosh
module Encryption
- VERSION = '1.5.0.pre2'
+ VERSION = '1.5.0.pre.3'
end
end
View
2  bosh_openstack_cpi/lib/cloud/openstack/version.rb
@@ -3,6 +3,6 @@
module Bosh
module OpenStackCloud
- VERSION = '1.5.0.pre2'
+ VERSION = '1.5.0.pre.3'
end
end
View
2  bosh_registry/lib/bosh_registry/version.rb
@@ -2,6 +2,6 @@
module Bosh
module Registry
- VERSION = '1.5.0.pre2'
+ VERSION = '1.5.0.pre.3'
end
end
View
2  bosh_vcloud_cpi/lib/cloud/vcloud/version.rb
@@ -2,7 +2,7 @@ module Bosh
module Clouds
class VCloud
- VERSION = '1.5.0.pre2'
+ VERSION = '1.5.0.pre.3'
end
end
View
2  bosh_vsphere_cpi/lib/cloud/vsphere/version.rb
@@ -1,7 +1,7 @@
module Bosh
module Clouds
class VSphere
- VERSION = '1.5.0.pre2'
+ VERSION = '1.5.0.pre.3'
end
end
end
View
2  director/lib/director/version.rb
@@ -2,6 +2,6 @@
module Bosh
module Director
- VERSION = '1.5.0.pre2'
+ VERSION = '1.5.0.pre.3'
end
end
View
2  health_monitor/lib/health_monitor/version.rb
@@ -1,5 +1,5 @@
module Bosh
module HealthMonitor
- VERSION = '1.5.0.pre2'
+ VERSION = '1.5.0.pre.3'
end
end
View
2  monit_api/lib/monit_api/version.rb
@@ -1,3 +1,3 @@
module MonitApi
- VERSION = '1.5.0.pre2'
+ VERSION = '1.5.0.pre.3'
end
View
2  package_compiler/lib/package_compiler/version.rb
@@ -1,6 +1,6 @@
module Bosh
module PackageCompiler
- VERSION = '1.5.0.pre2'
+ VERSION = '1.5.0.pre.3'
end
end
View
25 rake/gem.rake
@@ -5,15 +5,18 @@ COMPONENTS = %w( agent_client bosh_aws_bootstrap bosh_aws_cpi blobstore_client
COMPONENTS_WITH_PG = %w( director bosh_registry)
-root = File.expand_path('../../', __FILE__)
-version = File.read("#{root}/BOSH_VERSION").strip
-branch = "v#{version}"
-directory "pkg"
+def root
+ @root ||= File.expand_path('../../', __FILE__)
+end
+
+def version
+ @version ||= File.read("#{root}/BOSH_VERSION").strip
+end
COMPONENTS.each do |component|
namespace component do
- gem = "pkg/#{component}-#{version}.gem"
+ gem = "pkg/gems/#{component}-#{version}.gem"
gemspec = "#{component}.gemspec"
task :update_version_rb do
@@ -30,9 +33,9 @@ COMPONENTS.each do |component|
task :pre_stage_latest => [:update_version_rb, :pkg] do
if component_needs_update(component, root, version)
- sh "cd #{component} && gem build #{gemspec} && mv #{component}-#{version}.gem #{root}/pkg/"
+ sh "cd #{component} && gem build #{gemspec} && mv #{component}-#{version}.gem #{root}/pkg/gems/"
else
- sh "cp '#{last_released_component(component, root, version)}' #{root}/pkg/"
+ sh "cp '#{last_released_component(component, root, version)}' #{root}/pkg/gems/"
end
end
@@ -95,7 +98,11 @@ end
namespace :all do
desc "Prepare latest gem versions for staging"
- task :pre_stage_latest => COMPONENTS.map { |f| "#{f}:pre_stage_latest" }
+ task :pre_stage_latest do
+ rm_rf "pkg"
+ mkdir_p "pkg/gems"
+ COMPONENTS.map { |f| Rake::Task["#{f}:pre_stage_latest"].invoke }
+ end
desc "Copy all staged gems into appropriate release subdirectories"
task :finalize_release_directory => COMPONENTS.map { |f| "#{f}:finalize_release_directory" } do
@@ -110,7 +117,7 @@ namespace :all do
task :stage_with_dependencies => :pre_stage_latest do
mkdir_p "/tmp/all_the_gems/#{Process.pid}"
- sh "cp #{root}/pkg/*.gem /tmp/all_the_gems/#{Process.pid}"
+ sh "cp #{root}/pkg/gems/*.gem /tmp/all_the_gems/#{Process.pid}"
sh "cp #{root}/vendor/cache/*.gem /tmp/all_the_gems/#{Process.pid}"
end
View
124 rake/spec.rake
@@ -36,9 +36,14 @@ namespace :spec do
namespace :system do
namespace :aws do
desc "Run AWS MicroBOSH deployment suite"
- RSpec::Core::RakeTask.new(:micro) do |t|
- t.pattern = "spec/system/aws/**/*_spec.rb"
- t.rspec_opts = %w(--format documentation --color --tag ~cf --tag ~full)
+ task :micro do
+ begin
+ Rake::Task[:publish_gems].invoke
+ Rake::Task['stemcells:aws:create_and_publish_ami'].invoke(latest_stemcell_path, 'bosh-jenkins-artifacts')
+ Rake::Task['stemcells:aws:create_and_publish_ami'].invoke(latest_micro_bosh_stemcell_path, 'bosh-jenkins-artifacts')
+ ensure
+ Rake::Task[:teardown_microbosh].invoke
+ end
end
desc "Run AWS CF deployment suite"
@@ -46,6 +51,119 @@ namespace :spec do
t.pattern = "spec/system/aws/**/*_spec.rb"
t.rspec_opts = %w(--format documentation --color --tag cf)
end
+
+ task :deploy_micro do
+ directory("/tmp/deployments/micro")
+ Dir.chdir("/tmp/deployments") do
+ Dir.chdir("micro") do
+ run_bosh "aws generate micro_bosh '#{vpc_outfile_path}' '#{route53_outfile_path}'"
+ end
+ run_bosh "micro deployment micro"
+ run_bosh "micro deploy"
+
+ run_bosh "upload stemcell #{latest_stemcell_path}", debug_on_fail: true
+
+ st_version = stemcell_version(latest_stemcell_path)
+ run_bosh "aws generate bat_manifest '#{vpc_outfile_path}' '#{route53_outfile_path}' '#{st_version}'"
+ end
+ end
+
+ task :teardown_microbosh do
+ run_bosh "micro delete"
+ rm_rf("/tmp/deployments")
+ end
+
+ task :bat => :deploy_micro do
+ ENV['BAT_DIRECTOR'] = director
+ ENV['BAT_STEMCELL'] = latest_stemcell_path
+ ENV['BAT_DEPLOYMENT_SPEC'] = "/tmp/deployments/bat.yml"
+ ENV['BAT_VCAP_PASSWORD'] = 'c1oudc0w'
+ ENV['BAT_FAST'] = 'true'
+ ENV['BAT_SKIP_SSH'] = 'true'
+ ENV['BAT_DEBUG'] = 'verbose'
+ ENV['BAT_DNS_HOST'] = Resolv.getaddress(director)
+ Rake::Task['bat'].invoke
+ end
+
+ task :publish_gems => :bat do
+ build_number = ENV['BUILD_NUMBER']
+ file_contents = File.read('BOSH_VERSION')
+ file_contents.gsub!(/^([\d\.]+)\.pre\.\d+$/, "\\1.pre.#{build_number}")
+ File.open('BOSH_VERSION', 'w') { |f| f.write file_contents }
+ Rake::Task["all:pre_stage_latest"].invoke
+ run('cd pkg && gem generate_index .')
+ run('cd pkg && s3cmd sync . s3://bosh-jenkins-gems')
+ end
+
+ def stemcell_version(stemcell_path)
+ Dir.mktmpdir do |dir|
+ %x{tar xzf #{stemcell_path} --directory=#{dir} stemcell.MF} || raise("Failed to untar stemcell")
+ stemcell_manifest = "#{dir}/stemcell.MF"
+ st = YAML.load_file(stemcell_manifest)
+ st["version"]
+ end
+ end
+
+ def latest_micro_bosh_stemcell_path
+ Dir.glob("#{ENV['$JENKINS_HOME']}/aws_micro_bosh_stemcell/lastSuccessful/archive/*.tgz").first
+ end
+
+ def latest_stemcell_path
+ Dir.glob("#{ENV['$JENKINS_HOME']}/aws_bosh_stemcell/lastSuccessful/archive/*.tgz").first
+ end
+
+ def vpc_outfile_path
+ "#{ENV['$JENKINS_HOME']}/deployments-aws/ci2/aws_vpc_receipt.yml"
+ end
+
+ def route53_outfile_path
+ "#{ENV['$JENKINS_HOME']}/deployments-aws/ci2/aws_route53_receipt.yml"
+ end
+
+ def run(cmd, options = {})
+ Bundler.with_clean_env do
+ lines = []
+ IO.popen(cmd).each do |line|
+ puts line.chomp
+ lines << line.chomp
+ end.close # force the process to close so that $? is set
+ if options[:last_number]
+ line_number = options[:last_number]
+ line_number = lines.size if lines.size < options[:last_number]
+ cmd_out = lines[-line_number..-1].join("\n")
+ else
+ cmd_out = lines.join("\n")
+ end
+
+ unless $?.success?
+ err_msg = "Failed: '#{cmd}' from #{Dir.pwd}, with exit status #{$?.to_i}\n\n #{cmd_out}"
+
+ if options[:ignore_failures]
+ puts("#{err_msg}, continuing anyway")
+ else
+ raise(err_msg)
+ end
+ end
+ cmd_out
+ end
+ end
+
+ def run_bosh(cmd, options = {})
+ debug_on_fail = options.fetch(:debug_on_fail, false)
+ options.delete(:debug_on_fail)
+ @run_bosh_failures ||= 0
+ run "#{binstubs_path}/bosh -v -n -P 10 --config '#{bosh_config_path}' #{cmd}", options
+ rescue
+ @run_bosh_failures += 1
+ if @run_bosh_failures == 1 && debug_on_fail
+ # get the debug log, but only for the first failure, in case "bosh task last"
+ # fails - or we'll end up in an endless loop
+ run_bosh "task last --debug", {:last_number => 100}
+ @run_bosh_failures = 0
+ end
+ raise
+ end
+
end
desc "Run AWS system-wide suite"
View
76 rake/stemcell.rake
@@ -55,6 +55,82 @@ namespace :stemcell do
build("stemcell-mcf", options)
end
+
+ namespace :aws do
+ task :create_and_publish_ami, [:stemcell_tgz, :bucket_name] do |t,args|
+ stemcell_tgz = args[:stemcell_tgz]
+ bucket_name = args[:bucket_name]
+ access_key_id = ENV['BOSH_AWS_ACCESS_KEY_ID']
+ secret_access_key = ENV['BOSH_AWS_SECRET_ACCESS_KEY']
+ region = Net::HTTP.get('169.254.169.254', '/latest/meta-data/placement/availability-zone').chop
+ aws = {
+ "default_key_name" => "fake",
+ "region" => region,
+ "access_key_id" => access_key_id,
+ "secret_access_key" => secret_access_key
+ }
+
+ # just fake the registry struct, as we don't use it
+ options = {
+ "aws" => aws,
+ "registry" => {
+ "endpoint" => "http://fake.registry",
+ "user" => "fake",
+ "password" => "fake"
+ }
+ }
+
+ cloud_config = OpenStruct.new(:logger => Logger.new("ami.log"), :task_checkpoint => nil)
+ Bosh::Clouds::Config.configure(cloud_config)
+
+ cloud = Bosh::Clouds::Provider.create("aws", options)
+
+ Dir.mktmpdir do |dir|
+ %x{tar xzf #{stemcell_tgz} --directory=#{dir}} || raise("Failed to untar stemcell")
+ stemcell_manifest = "#{dir}/stemcell.MF"
+ stemcell_properties = YAML.load_file(stemcell_manifest)
+ image = "#{dir}/image"
+
+ ami_id = cloud.create_stemcell(image, stemcell_properties['cloud_properties'])
+ cloud.ec2.images[ami_id].public = true
+
+ stemcell_properties["cloud_properties"]["ami"] = { region => ami_id }
+
+ FileUtils.rm_rf(image)
+ FileUtils.touch(image)
+
+ File.open(stemcell_manifest, 'w' ) do |out|
+ YAML.dump(stemcell_properties, out )
+ end
+
+ light_stemcell_name = File.dirname(stemcell_tgz) + "/light-" + File.basename(stemcell_tgz)
+ Dir.chdir(dir) do
+ %x{tar cvzf #{light_stemcell_name} *} || raise("Failed to build light stemcell")
+ end
+
+ s3 = AWS::S3.new
+ s3.buckets.create(bucket_name) # doesn't fail if already exists in your account
+ bucket = s3.buckets[bucket_name]
+
+ obj = bucket.objects["last_successful_#{stemcell_properties["name"]}_ami"]
+ obj.write(ami_id)
+ obj.acl = :public_read
+ puts "AMI name written to: #{obj.public_url :secure => false}"
+
+ obj = bucket.objects["last_successful_#{stemcell_properties["name"]}_light.tgz"]
+ obj.write(:file => light_stemcell_name)
+ obj.acl = :public_read
+ puts "Lite stemcell written to: #{obj.public_url :secure => false}"
+
+ obj = bucket.objects["last_successful_#{stemcell_properties["name"]}.tgz"]
+ obj.write(:file => stemcell_tgz)
+ obj.acl = :public_read
+ puts "Stemcell written to: #{obj.public_url :secure => false}"
+ end
+
+ end
+ end
+
def build_micro_bosh_release
release_tarball = nil
Dir.chdir('release') do
View
2  ruby_vcloud_sdk/lib/ruby_vcloud_sdk/version.rb
@@ -1,3 +1,3 @@
module VCloudSdk
- VERSION = '1.5.0.pre2'
+ VERSION = '1.5.0.pre.3'
end
View
2  ruby_vim_sdk/lib/ruby_vim_sdk/version.rb
@@ -1,5 +1,5 @@
# Copyright (c) 2009-2012 VMware, Inc.
module VimSdk
- VERSION = '1.5.0.pre2'
+ VERSION = '1.5.0.pre.3'
end
View
2  simple_blobstore_server/lib/simple_blobstore_server/version.rb
@@ -1,3 +1,3 @@
module Bosh::SimpleBlobstoreServer
- VERSION = '1.5.0.pre2'
+ VERSION = '1.5.0.pre.3'
end
View
11 spec/ci_build_stemcell.sh
@@ -27,13 +27,4 @@ sudo rm -rf /mnt/$directory
WORK_PATH=/mnt/$directory/work \
BUILD_PATH=/mnt/$directory/build \
STEMCELL_VERSION=$BUILD_ID \
- $WORKSPACE/spec/ci_build.sh stemcell:$task[$infrastructure]
-
-stemcell=`ls /mnt/$directory/work/work/*.tgz`
-stemcell_base=`basename $stemcell .tgz`
-
-cp $stemcell $WORKSPACE/$stemcell_base.tgz
-
-if [ $infrastructure == 'aws' ]; then
- bundle exec $(dirname $0)/publish_ami.rb $WORKSPACE/$stemcell_base.tgz
-fi
+ $WORKSPACE/spec/ci_build.sh stemcell:$task[$infrastructure]
View
2  spec/support/aws_example_group.rb
@@ -40,7 +40,7 @@ def latest_stemcell_path
stemcell = build_data['artifacts'].map { |f| f['fileName'] }.detect { |f| f =~ /light/ }
dir = Dir.mktmpdir
Dir.chdir(dir) do
- `curl -skO https://ci:#{ENV['CI_PASSWORD']}@bosh-jenkins.cf-app.com/job/aws_bosh_stemcell/lastSuccessfulBuild/artifact/#{stemcell}`
+ `curl -sO https://bosh-jenkins-artifacts.s3.amazonaws.com/last_successful_bosh-stemcell_light.tgz`
end
"#{dir}/#{stemcell}"
end
View
32 spec/system/aws/micro_bosh_spec.rb
@@ -6,38 +6,6 @@
STEMCELL_VERSION = Bosh::Agent::VERSION
describe "microBOSH" do
- describe "acceptance tests:" do
- before do
- Dir.chdir(spec_tmp_path) do
- run_bosh "aws create '#{aws_configuration_template_path}'"
- run_bosh "aws bootstrap micro"
- end
- end
-
- it "should pass BATs" do
- run_bosh "upload stemcell #{latest_stemcell_path}", debug_on_fail: true
-
- FileUtils.mkdir_p bat_deployment_path
-
- Dir.chdir(bat_deployment_path) do
- st_version = stemcell_version(latest_stemcell_path)
- run_bosh "aws generate bat_manifest '#{vpc_outfile_path}' '#{route53_outfile_path}' '#{st_version}'"
- end
-
- director = "micro.#{ENV["BOSH_VPC_SUBDOMAIN"]}.cf-app.com"
- bat_env = {
- 'BAT_DIRECTOR' => director,
- 'BAT_STEMCELL' => latest_stemcell_path,
- 'BAT_DEPLOYMENT_SPEC' => "#{bat_deployment_path}/bat.yml",
- 'BAT_VCAP_PASSWORD' => 'c1oudc0w',
- 'BAT_FAST' => 'true',
- 'BAT_SKIP_SSH' => 'true',
- 'BAT_DEBUG' => 'verbose',
- 'BAT_DNS_HOST' => Resolv.getaddress(director),
- }
- system(bat_env, "rake bat").should be_true
- end
- end
describe "deploying" do
before do
View
BIN  vendor/cache/caldecott-client-0.0.2.gem
Binary file not shown
View
BIN  vendor/cache/cf-uaa-lib-1.3.7.gem
Binary file not shown
View
BIN  vendor/cache/cfoundry-0.5.2.gem
Binary file not shown
View
BIN  vendor/cache/clouseau-0.0.2.gem
Binary file not shown
View
BIN  vendor/cache/interact-0.5.2.gem
Binary file not shown
View
BIN  vendor/cache/manifests-vmc-plugin-0.6.2.gem
Binary file not shown
View
BIN  vendor/cache/mothership-0.5.1.gem
Binary file not shown
View
BIN  vendor/cache/multipart-post-1.2.0.gem
Binary file not shown
View
BIN  vendor/cache/rubyzip-0.9.9.gem
Binary file not shown
View
BIN  vendor/cache/tunnel-vmc-plugin-0.2.2.gem
Binary file not shown
View
BIN  vendor/cache/vmc-0.5.0.gem
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.