@@ -389,22 +389,26 @@ def create_doc_builder_factory():
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],
- codebase='yocto-docs',
- workdir=util.Interpolate("%(prop:builddir)s/yocto-docs"),
- mode='incremental',
+ f.addStep(WriteLayerInfo(name='Write main layerinfo.json', haltOnFailure=True))
+ f.addStep(steps.ShellCommand(
+ command=[
+ util.Interpolate("%(prop:builddir)s/yocto-autobuilder-helper/scripts/prepare-shared-repos"),
+ util.Interpolate("%(prop:builddir)s/layerinfo.json"),
+ util.Interpolate("{}/%(prop:buildername)s-%(prop:buildnumber)s".format(config.sharedrepodir)),
+ ],
haltOnFailure=True,
- name='Fetch yocto-docs'))
- f.addStep(steps.Git(
- repourl=config.repos["bitbake"][0],
- branch=config.repos["bitbake"][1],
- codebase='bitbake',
- workdir=util.Interpolate("%(prop:builddir)s/bitbake"),
- mode='incremental',
+ name="Prepare shared repositories"))
+ f.addStep(steps.ShellCommand(
+ command=[
+ util.Interpolate("%(prop:builddir)s/yocto-autobuilder-helper/scripts/shared-repo-unpack"),
+ util.Interpolate("%(prop:builddir)s/layerinfo.json"),
+ util.Interpolate("%(prop:builddir)s"),
+ util.Property("buildername"),
+ "-c", util.Interpolate("{}/%(prop:buildername)s-%(prop:buildnumber)s".format(config.sharedrepodir)),
+ "--workername", util.Interpolate("%(prop:workername)s"),
+ ],
haltOnFailure=True,
- name='Fetch bitbake'))
+ name="Unpack shared repositories"))
f.addStep(steps.ShellCommand(
command=[util.Interpolate("%(prop:builddir)s/yocto-autobuilder-helper/scripts/run-docs-build"),
util.Interpolate("%(prop:builddir)s"),
@@ -412,6 +416,10 @@ def create_doc_builder_factory():
util.Interpolate("%(prop:builddir)s/bitbake")],
haltOnFailure=True,
name="Run documentation Build"))
+ f.addStep(steps.ShellCommand(
+ command=["rm", "-fr", util.Interpolate("{}/%(prop:buildername)s-%(prop:buildnumber)s".format(config.sharedrepodir))],
+ haltOnFailure=True,
+ name="Remove shared repo dir"))
return f
# Only run one docs build at a time
@@ -27,7 +27,7 @@ buildertorepos = {
"checkuri": ["poky"],
"check-layer": ["poky", "meta-mingw", "meta-gplv2"],
"check-layer-nightly": ["poky", "meta-agl", "meta-arm", "meta-aws", "meta-intel", "meta-openembedded", "meta-virtualization", "meta-ti", "meta-security", "meta-clang", "meta-exein"],
- "docs": [],
+ "docs": ["yocto-docs", "bitbake"],
"reproducible-meta-oe": ["poky", "meta-openembedded"],
"patchtest": ["poky", "meta-patchtest", "meta-openembedded"],
"meta-oe-mirror": ["poky", "meta-openembedded"],
@@ -498,16 +498,7 @@ schedulers.append(parent_scheduler("a-full"))
schedulers.append(sched.ForceScheduler(
name="docs",
builderNames=["docs"],
- codebases=[util.CodebaseParameter(codebase='yab-helper',
- label="yocto-autobuilder-helper:",
- project=None),
- util.CodebaseParameter(codebase='yocto-docs',
- label="yocto-docs:",
- project=None),
- util.CodebaseParameter(codebase='bitbake',
- label="bitbake:",
- project=None),
- ],
+ codebases=[util.CodebaseParameter(codebase='yab-helper', label="yocto-autobuilder-helper:", project=None)],
reason=util.StringParameter(
name="reason",
label="""Reason (please note the reason for triggering the docs build:""",
The docs build was one of the only builder not using the shared-repos scripts. This prevented some of the repository properties to be overriden, such as the bitbake/yocto-docs repository URI. Overriding the bitbake URI is especially useful when using bitbake-contrib instead of bitbake, to test changes. Leave the yocto-autobuilder-helper in the codebases (like in the other builders), but move the yocto-docs/bitbake repositories to NEEDREPOS in yocto-autobuilder-helper/config.json. This patch depends on the patch "config.json: add docs build config" on yocto-autobuilder-helper. Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> --- builders.py | 36 ++++++++++++++++++++++-------------- config.py | 2 +- schedulers.py | 11 +---------- 3 files changed, 24 insertions(+), 25 deletions(-) --- base-commit: adb36c2213d331fd4a4fdcb5f48969b37bf1feb2 change-id: 20250103-docs-build-shared-repos-3cf38b589d73 Best regards,