Bug 1245953 - Support for only running tasks when certain files change; r=garndt
Firefox's automation currently tends to run all the jobs all the time. It is wasteful to do this. For example, running ESLint when the commit only changes a .cpp file adds no value. This commit adds support for only running tasks when certain files change. The new-style tasks introduced by the previous commit have been taught a "when" dictionary property that defines conditions that should hold for the task to be executed. We define a "file_patterns" list that defines lists of mozpack path matching expressions that will be matched against the set of files changed by the changesets relevant to the changeset being built. The eslint task has been updated to only run if files related to it change. Because conditions may not be accurate, we add a CLI argument to ignore conditions and force all would-be-filtered tasks to run. MozReview-Commit-ID: 3OeBSKAQAeg
This commit is contained in:
@@ -350,6 +350,7 @@ def parse_commit(message, jobs):
|
||||
# TODO support declaring a different build type
|
||||
'build_type': name,
|
||||
'interactive': args.interactive,
|
||||
'when': task.get('when', {})
|
||||
})
|
||||
|
||||
# Times that test jobs will be scheduled
|
||||
|
||||
Reference in New Issue
Block a user