forked from mirrors/gecko-dev
For a long time two copies of the 'taskgraph' module have existed in parallel. We've attempted to keep them in sync, but over time they have diverged and the maintenance burden has increased. In order to reduce this burden, we'd like to re-join the two code bases. The canonical repo will be the one that lives outside of mozilla-central, and this module will depend on it. Since they both have the same module name (taskgraph) we need to rename the version in mozilla-central to avoid collisions. Other consumers of 'taskgraph' (like mobile repos) have standardized on '<project>_taskgraph' as their module names. So replicating that here as well. Differential Revision: https://phabricator.services.mozilla.com/D127118
20 lines
635 B
Python
20 lines
635 B
Python
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
"""
|
|
Transforms for release tasks
|
|
"""
|
|
|
|
|
|
def run_on_releases(config, jobs):
|
|
"""
|
|
Filter out jobs with `run-on-releases` set, and that don't match the
|
|
`release_type` paramater.
|
|
"""
|
|
for job in jobs:
|
|
release_type = config.params["release_type"]
|
|
run_on_release_types = job.pop("run-on-releases", None)
|
|
|
|
if run_on_release_types is None or release_type in run_on_release_types:
|
|
yield job
|