summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-04-10 19:24:26 +0300
committerLars Wirzenius <liw@liw.fi>2020-04-10 19:24:26 +0300
commitddf06e34bfaadd24db9640c4ccebd630e6f1da52 (patch)
tree3d00b157eabe69ef8431a61c40e1226adba68b10
parent4e720a904bef704e800e6998d8e2a00d27c3e015 (diff)
downloadick-contractor-ddf06e34bfaadd24db9640c4ccebd630e6f1da52.tar.gz
Refactor: upload new worker image first
This enables us to do more steps in one SSH invocation later if we want to.
-rwxr-xr-xcontractor8
1 files changed, 4 insertions, 4 deletions
diff --git a/contractor b/contractor
index 89bb98f..ce0c0b5 100755
--- a/contractor
+++ b/contractor
@@ -64,16 +64,16 @@ class ContractorApplication(cliapp.Application):
m = self.manager(timer)
timer.report('load-build-spec')
- # This might fail. We ignore the failure.
- self.verbose('stopping worker')
- m.kill_worker()
-
self.verbose(
'uploading image to worker: {}'.format(bs.worker_image()))
if m.upload_worker_image(bs.worker_image()).failed():
self.error('could not upload image to worker')
sys.exit(1)
+ # This might fail. We ignore the failure.
+ self.verbose('stopping worker')
+ m.kill_worker()
+
self.verbose('setting up workspace on worker')
ws = bs.workspace()
source = bs.source()