try_job.py (596B)
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 from taskgraph.transforms.base import TransformSequence 6 7 transforms = TransformSequence() 8 9 10 @transforms.add 11 def set_job_try_name(config, jobs): 12 """ 13 For a task which is governed by `-j` in try syntax, set the `job_try_name` 14 attribute based on the job name. 15 """ 16 for job in jobs: 17 job.setdefault("attributes", {}).setdefault("job_try_name", job["name"]) 18 yield job