| Summary: | Need to cleanup work directories for cancelled builds | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Infrastructure] AutoBuilder | Reporter: | Richard Purdie <richard.purdie> | ||||
| Component: | autobuilder | Assignee: | Alexander Kanavin <alex.kanavin> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | Medium+ | CC: | alex.kanavin, infras.ab.watcher, Infras.watcher, mhalstead, pidge | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 4.3 M4 | ||||||
| Hardware: | x86 | ||||||
| OS: | Multiple | ||||||
| Whiteboard: | |||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |||||
| Attachments: |
|
||||||
|
Description
Richard Purdie
2023-09-04 10:48:33 UTC
This is where interrupting a build step is implemented: http://docs.buildbot.net/current/developer/cls-buildsteps.html#buildbot.process.buildstep.BuildStep.interrupt Next is to check how it's implemented, and whether it is extensible or sub-classable etc. --- a/builders.py
+++ b/builders.py
@@ -128,11 +128,12 @@ def create_builder_factory():
f.addStep(RunConfigCheckSteps(posttrigger=False))
- # If the build was successful, clean up the build directory
+ # If the build was successful or cancelled, clean up the build directory
f.addStep(steps.ShellCommand(
command=[clob, util.Interpolate("%(prop:builddir)s/")],
- doStepIf=lambda step: step.build.results == SUCCESS,
+ doStepIf=lambda step: step.build.results in (SUCCESS, CANCELLED),
haltOnFailure=False,
+ alwaysRun=True,
name="Clobber build dir"))
return f
This needs to be tested, as I'm not completely sure that alwaysRun will run the step also when the previous one was interrupted by the stop button.
Created attachment 4975 [details]
proposed patch (untested)
|