2020-02-20 10:36:03 +00:00
|
|
|
# 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/.
|
|
|
|
"""
|
2020-03-20 09:26:44 +00:00
|
|
|
Resolve secrets and dummy secrets
|
2020-02-20 10:36:03 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
from __future__ import absolute_import, print_function, unicode_literals
|
|
|
|
|
|
|
|
from taskgraph.transforms.base import TransformSequence
|
|
|
|
from taskgraph.util.schema import resolve_keyed_by
|
|
|
|
|
|
|
|
|
|
|
|
transforms = TransformSequence()
|
|
|
|
|
|
|
|
|
|
|
|
@transforms.add
|
|
|
|
def resolve_keys(config, tasks):
|
|
|
|
for task in tasks:
|
2020-03-03 16:22:48 +00:00
|
|
|
for key in ("run.secrets", "run.dummy-secrets"):
|
2020-02-20 10:36:03 +00:00
|
|
|
resolve_keyed_by(
|
|
|
|
task,
|
|
|
|
key,
|
|
|
|
item_name=task["name"],
|
|
|
|
level=config.params["level"]
|
|
|
|
)
|
|
|
|
yield task
|