builders: provide builder name to getproperties.py

Provide the builder name to the getproperties.py script, allowing to
extract data about build configuration, such as MACHINE or DISTRO.

The script does validate the number of arguments, so we remain
compatible with older versions of autobuilder helper that do not use
this new one.

Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Mathieu Dubois-Briand 2025-10-16 15:20:16 +02:00 committed by Richard Purdie
parent 6c6e13442c
commit 45b39a1b17

View File

@ -137,7 +137,7 @@ def create_builder_factory():
f.addStep(steps.JSONPropertiesDownload(workerdest="build-properties.json"))
f.addStep(steps.SetPropertyFromCommand(
command=util.Interpolate("%(prop:builddir)s/yocto-autobuilder-helper/scripts/getproperties.py %(prop:builddir)s/build"),
command=util.Interpolate("%(prop:builddir)s/yocto-autobuilder-helper/scripts/getproperties.py %(prop:builddir)s/build %(prop:buildername)s"),
extract_fn=extract_json_props,
name='Load build revisions',
haltOnFailure=True))
@ -342,7 +342,7 @@ def create_parent_builder_factory(buildername, waitname):
factory.addStep(steps.JSONPropertiesDownload(workerdest="build-properties.json"))
factory.addStep(steps.SetPropertyFromCommand(
command=util.Interpolate("%(prop:builddir)s/yocto-autobuilder-helper/scripts/getproperties.py %(prop:builddir)s/build"),
command=util.Interpolate("%(prop:builddir)s/yocto-autobuilder-helper/scripts/getproperties.py %(prop:builddir)s/build %(prop:buildername)s"),
extract_fn=extract_json_props,
name='Load build revisions',
haltOnFailure=True))