schedulers: Clean up build-appliance srcrev code

We need to show the build-appliance configuration on nightly as well as
nightly-build-appliance.

Also, default to AUTOREV, matching the behaviour of the old codebase.

Drop the "DEFAULT" magic value, default to that if a revision isn't specified.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2018-07-05 14:19:37 +01:00
parent 9ddf0f5613
commit c82e6fa387
2 changed files with 8 additions and 9 deletions

1
TODO
View File

@ -3,7 +3,6 @@
* Add wikilog link on console page
* implement buildhistory writeback step in -helper (can then drop from builders.py) [Richard]
* per worker auth (workers.py & config.py)
* DEFAULT for buildapp SRCREV still true? (schedulers.py)
* Add IRC notifier (services.py) [Michael]
* formatting/labels of the yocto-autobuilder-helper inputs (schedulers.py) [Paul]
* add mail notification functionality to yocto-autobuilder-helper, it already

View File

@ -43,6 +43,11 @@ def repos_for_builder(buildername):
parameters = parameters + inputs
return parameters
def buildappsrcrev_param():
return util.StringParameter(
name="buildappsrcrev",
label="""Build appliance source revision to use. Empty defaults to the srcrev currently in the recipe, use AUTOREV to use latest revision:""",
default="AUTOREV")
def props_for_builder(builder):
"""
@ -52,13 +57,7 @@ def props_for_builder(builder):
props = []
if builder == 'build-appliance':
props.append(util.StringParameter(
name="buildappsrcrev",
# TODO: is this statement still true?
label="""Build appliance src revision. Use DEFAULT to take the
srcrev currently in the recipe:""",
default="None",
))
props.append(buildappsrcrev_param())
if builder in ['build-appliance', 'buildtools']:
props.append(util.BooleanParameter(
name="deploy_artifacts",
@ -98,6 +97,7 @@ schedulers.append(sched.ForceScheduler(
any expectations for the build's outcome:""",
required=False),
properties=[
buildappsrcrev_param(),
util.BooleanParameter(
name="is_release",
label="Generate a release?",
@ -126,7 +126,7 @@ schedulers.append(sched.ForceScheduler(
label="Do we want to save build output? ",
default=False),
ReleaseSelector(
name="branch",
name="branch",
label="Release Shortcut Selector",
choices=["master", "rocko", "sumo", "pyro", "morty"],
selectors={