[IMP] runbot: keep result on kill if result is failure

When a build is killed, result will be set to manually killed,
removing the 'error' or 'warn' result.

This commit removes this behaviour in order to keep error result
in this case.
This commit is contained in:
Xavier-Do 2019-07-25 13:37:50 +02:00
parent 2aed7e1a48
commit 5bbfb06ce1

View File

@ -535,7 +535,10 @@ class runbot_build(models.Model):
self.env.cr.commit() # commit between each build to minimise transactionnal errors due to state computations
self.invalidate_cache()
if build.requested_action == 'deathrow':
build._kill(result='manually_killed')
result = None
if build.local_state != 'running' and build.global_result not in ('warn', 'ko'):
result = 'manually_killed'
build._kill(result=result)
continue
if build.requested_action == 'wake_up':