builders: use yocto-autobuilder-helper's clobberdir script

Removing the build directory (with rm -fr) can take a significant amount
of time, longer than the standard buildbot timeout, which delays the
builds. Instead, we use the clobberdir script from the helper repository.

This script moves the directory contents out of the way to a location which
is reaped by a background process.
Unfortunately this assumes/requires a copy of the repository is kept in the
home directory of the user running buildbot.

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
This commit is contained in:
Joshua Lock 2018-02-28 21:58:18 +00:00
parent e2dacc0f6a
commit 7fabb26b63
2 changed files with 10 additions and 6 deletions

2
TODO
View File

@ -5,7 +5,7 @@
# Future
* add mail notification functionality to yocto-autobuilder-helper, it already
knows how to iterate error reports.
* Move clobber script, janitor, etc into yocto-autobuilder-helper and make use of them
* Make use of janitor script from yocto-autobuilder-helper
* Simple script to start buildbot controller, janitor and PRServer
* Review ForceScheduler inputs and whether they are used by the helper scripts, particularly the poky_number parameter of nightly is possibly no longer required
* Teach the janitor to pre-clone the repos

View File

@ -41,9 +41,11 @@ def ensure_props_set(props):
def create_builder_factory():
f = util.BuildFactory()
# FIXME: use RP's script
# NOTE: Assumes that yocto-autobuilder repo has been cloned to home
# directory of the user running buildbot.
clob = os.path.expanduser("~/yocto-autobuilder-helper/janitor/clobberdir")
f.addStep(steps.ShellCommand(
command=["rm", "-fr", util.Interpolate("%(prop:builddir)s/")],
command=[clob, util.Interpolate("%(prop:builddir)s/")],
name="Clobber build dir"))
f.addStep(steps.Git(
repourl='git://git.yoctoproject.org/yocto-autobuilder-helper',
@ -86,9 +88,11 @@ for builder in config.triggered_builders:
factory=f))
factory = util.BuildFactory()
# FIXME: use RP's script
factory.addStep(steps.ShellCommand(
command=["rm", "-fr", util.Interpolate("%(prop:builddir)s/")],
# NOTE: Assumes that yocto-autobuilder repo has been cloned to home
# directory of the user running buildbot.
clob = os.path.expanduser("~/yocto-autobuilder-helper/janitor/clobberdir")
f.addStep(steps.ShellCommand(
command=[clob, util.Interpolate("%(prop:builddir)s/")],
name="Clobber build dir"))
# check out the source
factory.addStep(steps.Git(