diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2014-07-30 14:55:57 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2014-07-30 14:55:57 +0100 |
commit | 822a1457660a6b46d5f8c5ab8b28efeb8cb51b59 (patch) | |
tree | 8a5a12093975dfcf55ea9cb6e4db452899c74a9e /scripts/release-upload | |
parent | b2199074d608eee43a4dbdb4732eee71f52201f4 (diff) | |
download | definitions-822a1457660a6b46d5f8c5ab8b28efeb8cb51b59.tar.gz |
Allow release-upload to be configured not to upload release images
For continuous artifact cache population, we don't care so much about
the large disk images that we make available at release time.
This patch allows omitting any of the configuration required to upload
the release images to mean that we didn't want to upload them, and
continue without doing so.
Diffstat (limited to 'scripts/release-upload')
-rwxr-xr-x | scripts/release-upload | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/scripts/release-upload b/scripts/release-upload index 2e7f54e8..e7367f13 100755 --- a/scripts/release-upload +++ b/scripts/release-upload @@ -140,9 +140,27 @@ class ReleaseUploader(cliapp.Application): def process_args(self, args): self.status(msg='Uploading and publishing Baserock release') - BuildArtifactPublisher(self.settings, self.status).publish_build_artifacts() - ReleaseArtifactPublisher(self.settings, self.status).publish_release_artifacts() - self.status(msg='Release has been uploaded and published') + BuildArtifactPublisher(self.settings, + self.status).publish_build_artifacts() + self.status(msg='Build artifiacts have been published') + + RELEASE_OPTIONS = ('release-artifact-dir', + 'download-server-username', + 'download-server-address', + 'download-server-private-dir', + 'download-server-public-dir') + missing_options = set(option for option in RELEASE_OPTIONS + if self.settings[option] == '') + + if not missing_options: + ReleaseArtifactPublisher(self.settings, + self.status).publish_release_artifacts() + self.status(msg='Release images have been published') + else: + self.status(msg='Not uploading release images: ' + 'options not provided: {options}', + options=', '.join(missing_options)) + def status(self, msg, **kwargs): formatted = msg.format(**kwargs) |