[yocto] [yocto-autobuilder2][PATCH 1/2] builders: set early steps to halt on failure
Paul Eggleton
paul.eggleton at linux.intel.com
Tue Mar 6 20:00:10 PST 2018
If you can't clobber the build directory, check out the helper source
or unpack the repos successfully there's really not much point in
continuing, so stop the build immediately if they fail.
Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
---
builders.py | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/builders.py b/builders.py
index 815470e..2a9bc41 100644
--- a/builders.py
+++ b/builders.py
@@ -46,14 +46,16 @@ def create_builder_factory():
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='git://git.yoctoproject.org/yocto-autobuilder-helper',
workdir=util.Interpolate("%(prop:builddir)s/yocto-autobuilder-helper"),
mode='incremental',
+ haltOnFailure=True,
name='Fetch yocto-autobuilder-helper'))
f.addStep(steps.SetProperties(properties=ensure_props_set))
- f.addStep(WriteLayerInfo(name='Write main layerinfo.json'))
+ f.addStep(WriteLayerInfo(name='Write main layerinfo.json', haltOnFailure=True))
f.addStep(steps.ShellCommand(
command=[util.Interpolate("%(prop:builddir)s/yocto-autobuilder-helper/scripts/shared-repo-unpack"),
util.Interpolate("%(prop:builddir)s/layerinfo.json"),
@@ -61,6 +63,7 @@ def create_builder_factory():
util.Interpolate("%(prop:builddir)s/build"),
util.Property("buildername"),
util.Property("is_release")],
+ haltOnFailure=True,
name="Unpack shared repositories"))
f.addStep(steps.ShellCommand(
command=[util.Interpolate("%(prop:builddir)s/yocto-autobuilder-helper/scripts/run-config"),
@@ -93,20 +96,23 @@ factory = util.BuildFactory()
clob = os.path.expanduser("~/yocto-autobuilder-helper/janitor/clobberdir")
factory.addStep(steps.ShellCommand(
command=[clob, util.Interpolate("%(prop:builddir)s/")],
+ haltOnFailure=True,
name="Clobber build dir"))
# check out the source
factory.addStep(steps.Git(
repourl='git://git.yoctoproject.org/yocto-autobuilder-helper',
workdir=util.Interpolate("%(prop:builddir)s/yocto-autobuilder-helper"),
mode='incremental',
+ haltOnFailure=True,
name='Fetch yocto-autobuilder-helper'))
-factory.addStep(WriteLayerInfo(name='Write main layerinfo.json'))
+factory.addStep(WriteLayerInfo(name='Write main layerinfo.json', haltOnFailure=True))
factory.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)),
config.publish_dest],
+ haltOnFailure=True,
name="Prepare shared repositories"))
factory.addStep(steps.SetProperty(
property="sharedrepolocation",
@@ -122,6 +128,7 @@ factory.addStep(steps.ShellCommand(
util.Interpolate("%(prop:builddir)s/build"),
util.Property("buildername"),
util.Property("is_release")],
+ haltOnFailure=True,
name="Unpack shared repositories"))
# run-config
--
2.14.3
More information about the yocto
mailing list