A couple of fixes
cover A couple of fixes
A couple of initial fixes for the new autobuilder.
I'm still learning how to work with the new buildbot code, so let me know if I've missed anything :)
Paul Eggleton (2):
builders: set early steps to halt on failure
builders: set build revision to poky revision
TODO | 1 - builders.py | 16 ++++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-)
Signature · 1 line
2.14.3
PATCH 1/2 builders: set early steps to halt on failure
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.
--- builders.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
builders.py +9 -2
@@ -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
Signature · 1 line
2.14.3
PATCH 2/2 builders: set build revision to poky revision
In reply to Paul EggletonBy default, since the yocto-autobuilder-helper repository is the only one that buildbot actually checks out in a step, the revision of that is the one that gets associated with the build; however, it's much more useful to have the revision set to the poky revision, so add a step that does that.
--- TODO | 1 - builders.py | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-)
TODO +0 -1
@@ -4,7 +4,6 @@ * get_publish_dest (builders.py) [Joshua] * figure out htpasswd & auth for scheduling builds [Michael] * ensure need auth to trigger builds [Michael] - * Display poky revision in web UI, not the yocto-autobuilder-helper revision [Paul] # Future
builders.py +5 -0
@@ -131,6 +131,11 @@ factory.addStep(steps.ShellCommand( haltOnFailure=True, name="Unpack shared repositories")) +factory.addStep(steps.SetPropertyFromCommand(command=util.Interpolate("cd %(prop:sharedrepolocation)s/poky; git rev-parse HEAD"), + property="got_revision", + haltOnFailure=True, + name='Set build revision')) + # run-config factory.addStep(steps.ShellCommand( command=[
Signature · 1 line
2.14.3