[yocto] [yocto-autobuilder2][PATCH 2/2] builders: set build revision to poky revision

Paul Eggleton paul.eggleton at linux.intel.com
Tue Mar 6 20:00:11 PST 2018


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




More information about the yocto mailing list