summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2015-09-18 17:16:56 +0000
committerBaserock Gerrit <gerrit@baserock.org>2015-10-07 09:54:43 +0000
commit20ed314e1ac67c15b5439b35656cd8ee5603441f (patch)
treee217a43472a01363695e8842b632383ee714e320 /scripts
parent2c1e50cd81ce4098d3796fcb8f19f5092d25c3dd (diff)
downloaddefinitions-20ed314e1ac67c15b5439b35656cd8ee5603441f.tar.gz
scripts/release-build: Allow setting controller ports
This is useful if you have a distbuild controller with a non-standard port. It now also warns if something couldn't be built because there is no build network for that arch available. Change-Id: I5fcac2be9aa198afe16b76564d8307fed04bd526
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/release-build19
1 files changed, 15 insertions, 4 deletions
diff --git a/scripts/release-build b/scripts/release-build
index 4544dd41..2dc8c2ff 100755
--- a/scripts/release-build
+++ b/scripts/release-build
@@ -28,10 +28,17 @@ class Build(object):
def __init__(self, name, arch, app):
self.system_name = name
- self.controller = app.controllers[arch]
+
+ controller_netloc = app.controllers[arch].split(':')
+ controller_args = [
+ '--controller-initiator-address=%s' % controller_netloc[0],
+ ]
+ if len(controller_netloc) > 1:
+ controller_args.append(
+ '--controller-initiator-port=%s' % controller_netloc[1])
+
self.command = [
- 'morph', 'distbuild-morphology',
- '--controller-initiator-address=%s' % self.controller,
+ 'morph', 'distbuild-morphology'] + controller_args + [
'baserock:baserock/definitions', app.ref, self.system_name]
def start(self):
@@ -76,8 +83,9 @@ class ReleaseApp(cliapp.Application):
'''Process the command line'''
self.controllers = {}
controllers_list = self.settings['controllers']
+
for item in controllers_list:
- arch, controller = item.split(':')
+ arch, controller = item.split(':', 1)
self.controllers[arch] = controller
self.ref = cliapp.runcmd(['git', 'rev-parse', 'HEAD']).strip()
@@ -139,6 +147,9 @@ class ReleaseApp(cliapp.Application):
system, _ = self.load_morphology(system_name)
if system['arch'] in self.controllers:
builds.append(Build(system_name, system['arch'], self))
+ else:
+ print("Unable to build %s: no %s distbuild available" %
+ (system_name, system['arch']))
return builds
def deploy_images(self, cluster, cluster_path):