mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1249078 - Support grouping and running tasks by tag; r=garndt
We can now define a list of "tags" for a task. Specifying "-j <tag>" in Try syntax will run all tasks having that tag. MozReview-Commit-ID: Ih9Z0tRZ5VA
This commit is contained in:
parent
7b7f74dcc1
commit
8ce05975a4
@ -175,6 +175,11 @@ when
|
||||
*optional* Dictionary of conditions that must be met for this task
|
||||
to run. See the section below for more details.
|
||||
|
||||
tags
|
||||
*optional* List of string labels attached to the task. Multiple tasks
|
||||
with the same tag can all be scheduled at once by specifying the tag
|
||||
with the ``-j <tag>`` try syntax.
|
||||
|
||||
Conditional Execution
|
||||
---------------------
|
||||
|
||||
|
@ -332,9 +332,23 @@ def parse_commit(message, jobs):
|
||||
})
|
||||
|
||||
# Process miscellaneous tasks.
|
||||
for name, task in sorted(jobs.get('tasks', {}).items()):
|
||||
|
||||
def filtertask(name, task):
|
||||
# args.jobs == None implies all tasks.
|
||||
if args.jobs is not None and name not in args.jobs:
|
||||
if args.jobs is None:
|
||||
return True
|
||||
|
||||
if name in args.jobs:
|
||||
return True
|
||||
|
||||
for tag in task.get('tags', []):
|
||||
if tag in args.jobs:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
for name, task in sorted(jobs.get('tasks', {}).items()):
|
||||
if not filtertask(name, task):
|
||||
continue
|
||||
|
||||
# TODO support tasks that are defined as dependent on another one.
|
||||
|
Loading…
Reference in New Issue
Block a user