test_apk.py (986B)
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 Apply some defaults and minor modifications to the jobs defined in the test 6 kinds. 7 """ 8 9 from taskgraph.transforms.base import TransformSequence 10 from taskgraph.util.schema import resolve_keyed_by 11 12 transforms = TransformSequence() 13 14 15 @transforms.add 16 def resolve_keys(config, tasks): 17 for task in tasks: 18 for key in ( 19 "routes", 20 "scopes", 21 "extra.notify", 22 ): 23 resolve_keyed_by( 24 task, 25 key, 26 item_name=task["name"], 27 **{ 28 "level": config.params["level"], 29 "shipping-product": task.get("attributes", {}).get( 30 "shipping-product" 31 ), 32 }, 33 ) 34 yield task