diff --git a/.taskcluster.yml b/.taskcluster.yml index 34e3eb29dc0..1277a5ee0cc 100644 --- a/.taskcluster.yml +++ b/.taskcluster.yml @@ -27,7 +27,6 @@ tasks: features: taskclusterProxy: true env: - DECISION_TASK_ID: {$eval: as_slugid("decision_task")} GITHUB_EVENT_OWNER: ${event.pusher.name}@users.noreply.github.com GITHUB_EVENT_SOURCE: ${event.compare} GITHUB_EVENT_CLONE_URL: ${event.repository.clone_url} diff --git a/decision-task/run.py b/decision-task/run.py index 06ab5378195..69694b505fc 100644 --- a/decision-task/run.py +++ b/decision-task/run.py @@ -2,12 +2,13 @@ import os import sys +import json sys.path.insert(0, os.path.join(os.path.dirname(__file__), "vendored")) -import json - import taskcluster + +decision_task_id = os.environ["TASK_ID"] # https://docs.taskcluster.net/docs/reference/workers/docker-worker/docs/features#feature-taskclusterproxy queue = taskcluster.Queue(options={"baseUrl": "http://taskcluster/queue/v1/"}) @@ -19,8 +20,8 @@ def create_task(name, command, artifacts=None, dependencies=None, env=None, cach task_id = taskcluster.slugId() payload = { - "taskGroupId": os.environ["DECISION_TASK_ID"], - "dependencies": [os.environ["DECISION_TASK_ID"]] + (dependencies or []), + "taskGroupId": decision_task_id, + "dependencies": [decision_task_id] + (dependencies or []), "schedulerId": "taskcluster-github", "provisionerId": "aws-provisioner-v1", "workerType": "github-worker",