builders/yocto_console_view: Add yp_build_branch property

This corresponds to the poky branch being used by default so its easier
for users to tell the builds apart and know which ones they are.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2018-09-05 11:49:49 +01:00
parent 4cf104f35c
commit b972e58722
3 changed files with 13 additions and 2 deletions

View File

@ -159,6 +159,10 @@ def create_builder_factory():
haltOnFailure=True,
name='Set build revision'))
f.addStep(steps.SetPropertyFromCommand(command=util.Interpolate("cd %(prop:sharedrepolocation)s/poky; git rev-parse --abbrev-ref HEAD"),
property="yp_build_branch",
haltOnFailure=True,
name='Set build branch'))
f.addStep(RunConfigLogObserver(
command=[util.Interpolate("%(prop:builddir)s/yocto-autobuilder-helper/scripts/run-config"),
@ -234,6 +238,11 @@ factory.addStep(steps.SetPropertyFromCommand(command=util.Interpolate("cd %(prop
haltOnFailure=True,
name='Set build revision'))
factory.addStep(steps.SetPropertyFromCommand(command=util.Interpolate("cd %(prop:sharedrepolocation)s/poky; git rev-parse --abbrev-ref HEAD"),
property="yp_build_branch",
haltOnFailure=True,
name='Set build branch'))
# run-config
factory.addStep(RunConfigLogObserver(
command=[

View File

@ -76,7 +76,7 @@ class Console extends Controller
return 1
@$scope.builds = @builds = @dataAccessor.getBuilds
property: ["yp_build_revision"]
property: ["yp_build_revision", "yp_build_branch"]
limit: @buildLimit
order: '-started_at'
@changes = @dataAccessor.getChanges({limit: @changeLimit, order: '-changeid'})
@ -276,6 +276,8 @@ class Console extends Controller
if not change?
change = @makeFakeChange(rev, build.started_at, rev)
change.caption = "Commit"
if build.properties?.yp_build_branch?
change.caption = build.properties.yp_build_branch[0]
change.revlink = "http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=" + rev
change.errorlink = "http://errors.yoctoproject.org/Errors/Latest/Autobuilder/?filter=" + rev + "&type=commit"

File diff suppressed because one or more lines are too long