* [yocto-autobuilder2][PATCH 0/2] A couple of fixes
@ 2018-03-07 4:00 Paul Eggleton
2018-03-07 4:00 ` [yocto-autobuilder2][PATCH 1/2] builders: set early steps to halt on failure Paul Eggleton
2018-03-07 4:00 ` [yocto-autobuilder2][PATCH 2/2] builders: set build revision to poky revision Paul Eggleton
0 siblings, 2 replies; 3+ messages in thread
From: Paul Eggleton @ 2018-03-07 4:00 UTC (permalink / raw)
To: yocto
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(-)
--
2.14.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* [yocto-autobuilder2][PATCH 1/2] builders: set early steps to halt on failure
2018-03-07 4:00 [yocto-autobuilder2][PATCH 0/2] A couple of fixes Paul Eggleton
@ 2018-03-07 4:00 ` Paul Eggleton
2018-03-07 4:00 ` [yocto-autobuilder2][PATCH 2/2] builders: set build revision to poky revision Paul Eggleton
1 sibling, 0 replies; 3+ messages in thread
From: Paul Eggleton @ 2018-03-07 4:00 UTC (permalink / raw)
To: yocto
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [yocto-autobuilder2][PATCH 2/2] builders: set build revision to poky revision
2018-03-07 4:00 [yocto-autobuilder2][PATCH 0/2] A couple of fixes Paul Eggleton
2018-03-07 4:00 ` [yocto-autobuilder2][PATCH 1/2] builders: set early steps to halt on failure Paul Eggleton
@ 2018-03-07 4:00 ` Paul Eggleton
1 sibling, 0 replies; 3+ messages in thread
From: Paul Eggleton @ 2018-03-07 4:00 UTC (permalink / raw)
To: yocto
By 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.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
TODO | 1 -
builders.py | 5 +++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/TODO b/TODO
index 429c4f9..fe88e03 100644
--- a/TODO
+++ b/TODO
@@ -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
diff --git a/builders.py b/builders.py
index 2a9bc41..ae8a3d7 100644
--- a/builders.py
+++ b/builders.py
@@ -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=[
--
2.14.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-07 4:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-07 4:00 [yocto-autobuilder2][PATCH 0/2] A couple of fixes Paul Eggleton
2018-03-07 4:00 ` [yocto-autobuilder2][PATCH 1/2] builders: set early steps to halt on failure Paul Eggleton
2018-03-07 4:00 ` [yocto-autobuilder2][PATCH 2/2] builders: set build revision to poky revision Paul Eggleton
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.