builders: Drop got_revision hack and replace with yp_build_revision property

The got_revision trick, whilst quite neat, doesn't quite work and is a bit of
a hack breaking other buildbot internals. It gets et late in the builds leaving
a confusing build display in the meantime.

Use a dedicated property to store the "Yocto" build revision instead. This
property will be used by our own custom console UI.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2018-05-17 10:41:01 +01:00
parent fc62ac0f0d
commit 2856c3283d

View File

@ -145,7 +145,7 @@ def create_builder_factory():
name="Unpack shared repositories")) name="Unpack shared repositories"))
f.addStep(steps.SetPropertyFromCommand(command=util.Interpolate("cd %(prop:sharedrepolocation)s/poky; git rev-parse HEAD"), f.addStep(steps.SetPropertyFromCommand(command=util.Interpolate("cd %(prop:sharedrepolocation)s/poky; git rev-parse HEAD"),
property="got_revision", property="yp_build_revision",
haltOnFailure=True, haltOnFailure=True,
name='Set build revision')) name='Set build revision'))
@ -215,6 +215,10 @@ factory.addStep(steps.ShellCommand(
haltOnFailure=True, haltOnFailure=True,
name="Unpack shared repositories")) name="Unpack shared repositories"))
factory.addStep(steps.SetPropertyFromCommand(command=util.Interpolate("cd %(prop:sharedrepolocation)s/poky; git rev-parse HEAD"),
property="yp_build_revision",
haltOnFailure=True,
name='Set build revision'))
# run-config # run-config
factory.addStep(steps.ShellCommand( factory.addStep(steps.ShellCommand(
@ -238,7 +242,7 @@ def get_props_set():
"is_release": util.Property("is_release"), "is_release": util.Property("is_release"),
"buildappsrcrev": "None", "buildappsrcrev": "None",
"deploy_artifacts": util.Property("deploy_artifacts"), "deploy_artifacts": util.Property("deploy_artifacts"),
"publish_destination": util.Property("publish_destination") "publish_destination": util.Property("publish_destination"),
} }
for repo in config.repos: for repo in config.repos:
@ -248,11 +252,6 @@ def get_props_set():
return set_props return set_props
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'))
factory.addStep(steps.Trigger(schedulerNames=['wait'], factory.addStep(steps.Trigger(schedulerNames=['wait'],
waitForFinish=True, waitForFinish=True,
set_properties=get_props_set())) set_properties=get_props_set()))