Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/taskgraph/transforms/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,8 @@
Optional("os-groups"): [str],
# feature for test task to run as administarotr
Optional("run-as-administrator"): bool,
# feature for task to run as current OS user
Optional("run-task-as-current-user"): bool,
# optional features
Required("chain-of-trust"): bool,
Optional("taskcluster-proxy"): bool,
Expand Down Expand Up @@ -757,6 +759,12 @@
"generic-worker:run-as-administrator:{}".format(task["worker-type"]),
)

if worker.get("run-task-as-current-user", False):
features["runTaskAsCurrentUser"] = True
task_def["scopes"].append(

Check warning on line 764 in src/taskgraph/transforms/task.py

View check run for this annotation

Codecov / codecov/patch

src/taskgraph/transforms/task.py#L763-L764

Added lines #L763 - L764 were not covered by tests
"generic-worker:run-task-as-current-user:{}".format(task["worker-type"]),
)

if features:
task_def["payload"]["features"] = features

Expand Down
Loading