diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-07-02 09:54:27 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-07-02 09:54:45 +0000 |
commit | 4189625ac0ed5f04e9dc63bd5d603dd63782fa1b (patch) | |
tree | c79f5afccca954bc9afd4a49fc5cdd8d505e7c69 | |
parent | 2b60b3c7a054e6e839014bb4ea7f33b42b195879 (diff) | |
download | definitions-4189625ac0ed5f04e9dc63bd5d603dd63782fa1b.tar.gz |
do-release: Check access to configured upload servers when script starts
If the release script is expected to be 'push-button' then we can't
assume the user will be paying attention to error messages later on.
-rw-r--r-- | scripts/do-release.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/do-release.py b/scripts/do-release.py index ad34dc3e..5c4fff04 100644 --- a/scripts/do-release.py +++ b/scripts/do-release.py @@ -538,9 +538,23 @@ class Upload(object): cliapp.ssh_runcmd(server, ['rm', remote_artifacts_tar]) +def check_ssh_access(server): + status('Checking for access to server %s', server) + + try: + cliapp.ssh_runcmd(server, ['true']) + except cliapp.AppException as e: + logging.debug('Got exception: %s', e) + raise cliapp.AppException( + 'Couldn\'t connect to configured remote server %s' % server) + + def main(): logging.basicConfig(level=logging.INFO) + check_ssh_access(config.images_server) + check_ssh_access(config.artifacts_server) + deploy_images = DeployImages() outputs = deploy_images.run() |