mirror of
git://git.yoctoproject.org/yocto-autobuilder2.git
synced 2025-07-19 20:59:02 +02:00
builders.py, observery.py: Convert to *NewStyle
ShellCommandNewStyle For buildbot 2.9.x migration Signed-off-by: Jate Sujjavanich <jatedev@gmail.com>
This commit is contained in:
parent
c18365d92f
commit
de07ef9045
20
builders.py
20
builders.py
|
@ -88,7 +88,7 @@ def create_builder_factory():
|
|||
# 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(
|
||||
f.addStep(steps.ShellCommandNewStyle(
|
||||
command=[clob, util.Interpolate("%(prop:builddir)s/")],
|
||||
haltOnFailure=True,
|
||||
name="Clobber build dir"))
|
||||
|
@ -102,7 +102,7 @@ def create_builder_factory():
|
|||
f.addStep(TargetPresent())
|
||||
f.addStep(steps.SetProperties(properties=ensure_props_set))
|
||||
f.addStep(WriteLayerInfo(name='Write main layerinfo.json', haltOnFailure=True))
|
||||
f.addStep(steps.ShellCommand(
|
||||
f.addStep(steps.ShellCommandNewStyle(
|
||||
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/build"),
|
||||
|
@ -127,7 +127,7 @@ def create_builder_factory():
|
|||
f.addStep(RunConfigCheckSteps(posttrigger=False))
|
||||
|
||||
# If the build was successful, clean up the build directory
|
||||
f.addStep(steps.ShellCommand(
|
||||
f.addStep(steps.ShellCommandNewStyle(
|
||||
command=[clob, util.Interpolate("%(prop:builddir)s/")],
|
||||
doStepIf=lambda step: step.build.results == SUCCESS,
|
||||
haltOnFailure=False,
|
||||
|
@ -231,7 +231,7 @@ def create_parent_builder_factory(buildername, waitname):
|
|||
# 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")
|
||||
factory.addStep(steps.ShellCommand(
|
||||
factory.addStep(steps.ShellCommandNewStyle(
|
||||
command=[clob, util.Interpolate("%(prop:builddir)s/")],
|
||||
haltOnFailure=True,
|
||||
name="Clobber build dir"))
|
||||
|
@ -244,7 +244,7 @@ def create_parent_builder_factory(buildername, waitname):
|
|||
haltOnFailure=True,
|
||||
name='Fetch yocto-autobuilder-helper'))
|
||||
factory.addStep(WriteLayerInfo(name='Write main layerinfo.json', haltOnFailure=True))
|
||||
factory.addStep(steps.ShellCommand(
|
||||
factory.addStep(steps.ShellCommandNewStyle(
|
||||
command=[
|
||||
util.Interpolate("%(prop:builddir)s/yocto-autobuilder-helper/scripts/prepare-shared-repos"),
|
||||
util.Interpolate("%(prop:builddir)s/layerinfo.json"),
|
||||
|
@ -262,7 +262,7 @@ def create_parent_builder_factory(buildername, waitname):
|
|||
factory.addStep(steps.SetProperty(property="build_type", value="quick"))
|
||||
|
||||
# shared-repo-unpack
|
||||
factory.addStep(steps.ShellCommand(
|
||||
factory.addStep(steps.ShellCommandNewStyle(
|
||||
command=[
|
||||
util.Interpolate("%(prop:builddir)s/yocto-autobuilder-helper/scripts/shared-repo-unpack"),
|
||||
util.Interpolate("%(prop:builddir)s/layerinfo.json"),
|
||||
|
@ -320,7 +320,7 @@ def create_parent_builder_factory(buildername, waitname):
|
|||
|
||||
factory.addStep(RunConfigCheckSteps(posttrigger=True))
|
||||
|
||||
factory.addStep(steps.ShellCommand(
|
||||
factory.addStep(steps.ShellCommandNewStyle(
|
||||
command=[
|
||||
util.Interpolate("%(prop:builddir)s/yocto-autobuilder-helper/scripts/send-qa-email"),
|
||||
util.Property("send_email"),
|
||||
|
@ -333,7 +333,7 @@ def create_parent_builder_factory(buildername, waitname):
|
|||
name="Send QA Email"))
|
||||
|
||||
|
||||
factory.addStep(steps.ShellCommand(
|
||||
factory.addStep(steps.ShellCommandNewStyle(
|
||||
command=["rm", "-fr", util.Interpolate("{}/%(prop:buildername)s-%(prop:buildnumber)s".format(config.sharedrepodir))],
|
||||
haltOnFailure=True,
|
||||
name="Remove shared repo dir"))
|
||||
|
@ -349,7 +349,7 @@ def create_doc_builder_factory():
|
|||
# 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(
|
||||
f.addStep(steps.ShellCommandNewStyle(
|
||||
command=[clob, util.Interpolate("%(prop:builddir)s/")],
|
||||
haltOnFailure=True,
|
||||
name="Clobber build dir"))
|
||||
|
@ -374,7 +374,7 @@ def create_doc_builder_factory():
|
|||
mode='incremental',
|
||||
haltOnFailure=True,
|
||||
name='Fetch bitbake'))
|
||||
f.addStep(steps.ShellCommand(
|
||||
f.addStep(steps.ShellCommandNewStyle(
|
||||
command=[util.Interpolate("%(prop:builddir)s/yocto-autobuilder-helper/scripts/run-docs-build"),
|
||||
util.Interpolate("%(prop:builddir)s"),
|
||||
util.Interpolate("%(prop:builddir)s/yocto-docs"),
|
||||
|
|
|
@ -9,7 +9,7 @@ from buildbot.process.results import FAILURE
|
|||
from buildbot.process.results import SKIPPED
|
||||
from buildbot.process.results import SUCCESS
|
||||
from buildbot.process.results import WARNINGS
|
||||
from buildbot.steps.shell import ShellCommand
|
||||
from buildbot.steps.shell import ShellCommandNewStyle
|
||||
|
||||
from functools import partial
|
||||
|
||||
|
@ -17,7 +17,7 @@ from functools import partial
|
|||
# Monitor the step 1-X logs and stdio, collecting up any warnings and errors seen
|
||||
# and publish them at the end in their own 'logfile' for ease of access to the user
|
||||
#
|
||||
class SimpleLogObserver(ShellCommand):
|
||||
class SimpleLogObserver(ShellCommandNewStyle):
|
||||
|
||||
warnOnWarnings = True
|
||||
warnOnFailure = True
|
||||
|
|
Loading…
Reference in New Issue
Block a user