summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2014-07-30 14:07:59 (GMT)
committerMichael Drake <michael.drake@codethink.co.uk>2014-07-30 14:07:59 (GMT)
commitd91a916069b6a0acfbee21ce26e68633fa667258 (patch)
treeb87a04c15a5f420a6bd57848be9a55e4e8af17dc
parent9b744d4b2536ec6c75f341bc4535eb93b203ee5a (diff)
downloaddefinitions-baserock/michaeldrake/ci-release-scripts.tar.gz
Allow release deployments with system name ≠ deployment namebaserock/michaeldrake/ci-release-scripts
There used to be a check that prevented deployments with names different to the system. I don't know why this was, but I don't think we need it.
-rwxr-xr-xscripts/release-build45
1 files changed, 21 insertions, 24 deletions
diff --git a/scripts/release-build b/scripts/release-build
index fe10ba3..7713aab 100755
--- a/scripts/release-build
+++ b/scripts/release-build
@@ -131,32 +131,29 @@ class ReleaseApp(cliapp.Application):
outputs = {}
for system in cluster['systems']:
- name = system['morph']
- morphology = self.load_morphology(name)[0]
+ morphology_name = system['morph']
+ morphology = self.load_morphology(morphology_name)[0]
if morphology['arch'] not in self.controllers:
continue
- if name not in system['deploy']:
- raise cliapp.AppException(
- 'In %s: system %s ID should be "%s"' %
- (cluster_path, name, name))
-
- # The release.morph cluster must specify a basename for the file,
- # of name and extension. This script knows about name, but it
- # can't find out the appropriate file extension without second
- # guessing the behaviour of write extensions.
- basename = system['deploy'][name]['location']
-
- if '/' in basename or basename.startswith(version_label):
- raise cliapp.AppException(
- 'In %s: system %s.location should be just the base name, '
- 'e.g. "%s.img"' % (cluster_path, name, name))
-
- filename = os.path.join('release', '%s-%s' % (version_label, basename))
- if os.path.exists(filename):
- self.output.write('Reusing existing deployment of %s\n' % filename)
- else:
- self.output.write('Creating %s from release.morph\n' % filename)
- self.deploy_single_image(cluster_path, name, filename, version_label)
+
+ for deployment_name, deployment_info in system['deploy'].iteritems():
+ # The release.morph cluster must specify a basename for the file,
+ # of name and extension. This script knows about name, but it
+ # can't find out the appropriate file extension without second
+ # guessing the behaviour of write extensions.
+ basename = deployment_info['location']
+
+ if '/' in basename or basename.startswith(version_label):
+ raise cliapp.AppException(
+ 'In %s: system %s.location should be just the base name, '
+ 'e.g. "%s.img"' % (cluster_path, deployment_name, deployment_name))
+
+ filename = os.path.join('release', '%s-%s' % (version_label, basename))
+ if os.path.exists(filename):
+ self.output.write('Reusing existing deployment of %s\n' % filename)
+ else:
+ self.output.write('Creating %s from release.morph\n' % filename)
+ self.deploy_single_image(cluster_path, deployment_name, filename, version_label)
def deploy_single_image(self, cluster_path, name, location, version_label):
deploy_command = [