I have a buildbot build factory with several steps. One of the steps periodically times out causing buildbot to throw an exception and exit. However, even in this case I'd like to be able to store the logs generated.
One option would be to add a step that only runs if the previous step timed out. Using doStepIf
is possible. However, there is no way to see status as TIMEOUT
there are just SUCCESS, WARNINGS, FAILURE, or SKIPPED
.
What is the best way to solve this problem?
AN example of the doStepIf
function:
from buildbot.status.builder import Results, SUCCESS
def doStepIf(step):
allSteps = step.build.getStatus().getSteps()
lastStep = allSteps[-1]
rc = lastStep.getResults()[0] # returns a tuple of (rc, string)
# if the rc == SUCCESS then don't continue, since we don't want to run this step
return Results[rc] == Results[SUCCESS]
haltOnFailure
attribute value have your step? If it's set to True, then further steps (e.g. logs storing) will be skipped, unless they havealwaysRun
attribute set to True. See docs.buildbot.net/latest/manual/… for details – Stereoscopy