release.py (635B)
1 # This Source Code Form is subject to the terms of the Mozilla Public 2 # License, v. 2.0. If a copy of the MPL was not distributed with this 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 5 """ 6 Transforms for release tasks 7 """ 8 9 10 def run_on_releases(config, jobs): 11 """ 12 Filter out jobs with `run-on-releases` set, and that don't match the 13 `release_type` paramater. 14 """ 15 for job in jobs: 16 release_type = config.params["release_type"] 17 run_on_release_types = job.pop("run-on-releases", None) 18 19 if run_on_release_types is None or release_type in run_on_release_types: 20 yield job