diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-05-07 10:58:40 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-05-07 10:58:40 +0300 |
commit | 98b213fca8cc23f63e427c900c11cfad6ae4ceba (patch) | |
tree | ea382b9996290476fa542f2d4c19adef45ffa322 | |
parent | b2deb18a85a268966b4c5d6215c1b5e95cf22fd1 (diff) | |
download | ick-contractor-98b213fca8cc23f63e427c900c11cfad6ae4ceba.tar.gz |
Change: sync workspace after a build, even if build failed
-rwxr-xr-x | contractor | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -128,7 +128,7 @@ class ContractorApplication(cliapp.Application): Chdir('/workspace/src'), Build(bs.build()), ] - self.exec_verbosely(worker, *execs) + build_failed = worker.verbosely(*execs).failed() with Timer(self.verbose, 'shutdown-worker'): execs = [ @@ -142,6 +142,10 @@ class ContractorApplication(cliapp.Application): self.verbose('saving workspace to {}'.format(ws)) self.sync_from_workspace(dest, port, ws) + if build_failed: + self.error('build FAILED') + sys.exit(1) + self.verbose('build finished OK') def load_build_spec(self, filename): |