All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: yocto@yoctoproject.org
Subject: [yocto-autobuilder2][PATCH 1/2] builders: set early steps to halt on failure
Date: Wed,  7 Mar 2018 17:00:10 +1300	[thread overview]
Message-ID: <20180307040011.2907-2-paul.eggleton@linux.intel.com> (raw)
In-Reply-To: <20180307040011.2907-1-paul.eggleton@linux.intel.com>

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@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



  reply	other threads:[~2018-03-07  4:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07  4:00 [yocto-autobuilder2][PATCH 0/2] A couple of fixes Paul Eggleton
2018-03-07  4:00 ` Paul Eggleton [this message]
2018-03-07  4:00 ` [yocto-autobuilder2][PATCH 2/2] builders: set build revision to poky revision Paul Eggleton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180307040011.2907-2-paul.eggleton@linux.intel.com \
    --to=paul.eggleton@linux.intel.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.