aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-01-27 16:21:22 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-05-22 15:21:57 +0300
commite708ce0c8d47474b977709ce3b75cc0b45c5e83a (patch)
tree4a809cd3b1113522a62fba2521c27fab6b2dece1
parent996b75e993b1f333c55d841d4c4deefb3a6ed20c (diff)
downloadlinaro-aws-tools-e708ce0c8d47474b977709ce3b75cc0b45c5e83a.tar.gz
Allow to specify full command for init script fetching.
To support arbitrary VCSs.
-rw-r--r--linaro-ami/linaro-ami.conf4
-rw-r--r--linaro-ami/linaro_ami.py9
2 files changed, 6 insertions, 7 deletions
diff --git a/linaro-ami/linaro-ami.conf b/linaro-ami/linaro-ami.conf
index 1070bad..24411d7 100644
--- a/linaro-ami/linaro-ami.conf
+++ b/linaro-ami/linaro-ami.conf
@@ -10,13 +10,13 @@ key_name = linaro-ami-key
[ab-natty-64bit]
base_ami = ami-87c31aee
-init_script_repo = lp:linaro-android-build-tools
+init_script_fetch = git clone http://git.linaro.org/git/infrastructure/linaro-android-build-tools.git
init_script = node/setup-build-android
description = Build Slave AMI for android-build.linaro.org based on Natty 64bit
[ab-precise-64bit]
base_ami = ami-23d9a94a
-init_script_repo = lp:linaro-android-build-tools
+init_script_fetch = git clone http://git.linaro.org/git/infrastructure/linaro-android-build-tools.git
init_script = node/setup-build-android
description = Build Slave AMI for android-build.linaro.org based on Precise 64bit
diff --git a/linaro-ami/linaro_ami.py b/linaro-ami/linaro_ami.py
index 9b76dd7..c0840b7 100644
--- a/linaro-ami/linaro_ami.py
+++ b/linaro-ami/linaro_ami.py
@@ -57,7 +57,7 @@ class LinaroAMI:
instance = None
base_ami = self.config.get(ami_name, "base_ami")
instance_type = self.config.get(ami_name, "instance_type")
- script_repo = self.config.get(ami_name, "init_script_repo")
+ script_fetch = self.config.get(ami_name, "init_script_fetch")
if self.options.key:
key_autocreate = False
key_name = self.options.key
@@ -88,10 +88,9 @@ class LinaroAMI:
"DEFAULT", "vcs_install"))
self.log.debug(install_command_output)
- self.log.info("Branching slave init repo.")
- bzr_command_output = self.executor.execute(
- "bzr branch %s slave-init" % script_repo)
- self.log.debug(bzr_command_output)
+ self.log.info("Cloning slave init repo.")
+ fetch_command_output = self.executor.execute(script_fetch + " slave-init")
+ self.log.debug(fetch_command_output)
script_command = "sudo bash slave-init/" + self.config.get(
ami_name, "init_script")