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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user