lib/boot.rb in forj-0.0.26 vs lib/boot.rb in forj-0.0.27
- old
+ new
@@ -33,11 +33,14 @@
#
# Boot module
#
module Boot
- def boot(blueprint, cloud_provider, name, build_config_dir, branch, test = false)
+ def boot(blueprint, cloud_provider, name,
+ build, build_config_dir, build_config,
+ branch, git_repo, boothook, box_name,
+ test = false)
begin
initial_msg = 'booting %s on %s' % [blueprint , cloud_provider]
Logging.info(initial_msg)
puts (initial_msg)
@@ -72,16 +75,24 @@
current_dir = Dir.pwd
home = Helpers.get_home_path
build_path = home + '/.forj/maestro/build'
Dir.chdir(build_path)
- if build_config_dir
- command = 'bin/build.sh --build_ID maestro.%s --box-name maestro --build-conf-dir %s --build-config box-13.5 --gitBranch %s' % [name,build_config_dir, branch]
- elsif blueprint != 'redstone'
- command = 'bin/build.sh --build_ID %s --box-name maestro --build-conf-dir ~/.forj/maestro/build/conf --build-config box --blueprint %s' % [name, blueprint]
- else
- command = 'bin/build.sh --build_ID %s --box-name maestro --build-conf-dir ~/.forj/maestro/build/conf --build-config box' % [name]
- end
+ build = 'bin/build.sh' unless build
+
+ build_config_dir = '~/.forj/maestro/build/conf' unless build_config_dir
+
+ build_config = 'box' unless build_config
+
+ branch = 'master' unless branch
+
+ git_repo = 'review:forj-oss/maestro' unless git_repo
+
+ box_name = 'maestro' unless box_name
+
+ boothook = '~/.forj/maestro/build/bin/build-tools/boothook.sh' unless boothook
+
+ command = '%s --build_ID %s --box-name %s --build-conf-dir %s --build-config %s --gitBranch %s --gitRepo %s --boothook %s' % [build, name, box_name, build_config_dir, build_config, branch, git_repo, boothook]
Kernel.system(command)
Dir.chdir(current_dir)
if test