builders/config/schedulers: Add support for 'docs' builder

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2020-11-05 12:17:31 +00:00
parent be1ea85969
commit d81c7ca443
3 changed files with 49 additions and 2 deletions

View File

@ -385,3 +385,36 @@ def create_parent_builder_factory(buildername, waitname):
builders.append(util.BuilderConfig(name="a-quick", workernames=config.workers, factory=create_parent_builder_factory("a-quick", "wait-quick"), nextWorker=nextWorker, nextBuild=nextBuild, env=extra_env))
builders.append(util.BuilderConfig(name="a-full", workernames=config.workers, factory=create_parent_builder_factory("a-full", "wait-full"), nextWorker=nextWorker, nextBuild=nextBuild, env=extra_env))
def create_doc_builder_factory():
f = util.BuildFactory()
# 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/")],
haltOnFailure=True,
name="Clobber build dir"))
f.addStep(steps.Git(
repourl=config.repos["yocto-autobuilder-helper"][0],
branch=config.repos["yocto-autobuilder-helper"][1],
workdir=util.Interpolate("%(prop:builddir)s/yocto-autobuilder-helper"),
mode='incremental',
haltOnFailure=True,
name='Fetch yocto-autobuilder-helper'))
f.addStep(steps.Git(
repourl=config.repos["yocto-docs"][0],
branch=config.repos["yocto-docs"][1],
workdir=util.Interpolate("%(prop:builddir)s/yocto-docs"),
mode='incremental',
haltOnFailure=True,
name='Fetch yocto-docs'))
f.addStep(steps.ShellCommand(
command=[util.Interpolate("%(prop:builddir)s/yocto-autobuilder-helper/scripts/run-docs-build"),
util.Interpolate("%(prop:builddir)s/yocto-docs")],
haltOnFailure=True,
name="Run documentation Build"))
return f
builders.append(util.BuilderConfig(name="docs", workernames=config.workers, factory=create_doc_builder_factory(), nextWorker=nextWorker, nextBuild=nextBuild, env=extra_env))

View File

@ -17,6 +17,7 @@ buildertorepos = {
"qemuarm-oecore": ["oecore", "bitbake"],
"checkuri": ["poky"],
"check-layer": ["poky", "meta-mingw", "meta-gplv2"],
"docs": ["yocto-docs"],
"default": ["poky"]
}
@ -42,7 +43,8 @@ repos = {
"meta-gplv2": ["git://git.yoctoproject.org/meta-gplv2", "master"],
"meta-openembedded": ["git://git.openembedded.org/meta-openembedded", "master"],
"meta-virtualization": ["git://git.yoctoproject.org/meta-virtualization", "master"],
"meta-kernel": ["https://gitlab.com/openembedded/community/meta-kernel.git", "master"]
"meta-kernel": ["https://gitlab.com/openembedded/community/meta-kernel.git", "master"],
"yocto-docs": ["git://git.yoctoproject.org/yocto-docs", "master"]
}
trigger_builders_wait_shared = [
@ -93,7 +95,7 @@ builders_others = [
]
subbuilders = list(set(trigger_builders_wait_quick + trigger_builders_wait_full + builders_others))
builders = ["a-quick", "a-full"] + subbuilders
builders = ["a-quick", "a-full", "docs"] + subbuilders
# ## Cluster configuration
# Publishing settings

View File

@ -287,6 +287,18 @@ def parent_scheduler(target):
schedulers.append(parent_scheduler("a-quick"))
schedulers.append(parent_scheduler("a-full"))
schedulers.append(sched.ForceScheduler(
name="docs",
builderNames=["docs"],
reason=util.StringParameter(
name="reason",
label="""Reason (please note the reason for triggering the docs build:""",
required=False),
properties=props_for_builder("docs"),
buttonName="Force Build"))
# Run a-quick at 1am each day Mon-Sat so we keep master tested and up to date in sstate and buildhistory
schedulers.append(sched.Nightly(name='nightly-quick', branch='master', properties=parent_default_props('a-quick'),
builderNames=['a-quick'], hour=1, minute=0, dayOfWeek=[0,1,2,3,4,5]))