Closed Bug 1038475 Opened 10 years ago Closed 10 years ago

docker-worker: add env variables TASKCLUSTER_TASKID and TASKCLUSTER_RUNID

Categories

(Taskcluster :: Workers, enhancement)

x86_64
Linux
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jonasfj, Unassigned)

Details

Docker worker should extend the environment variables given to a task with:
 - TASKCLUSTER_TASKID, and
 - TASKCLUSTER_RUNID

So that a task always knows what taskId it has and what runId it's currently running.
Most tasks won't need this, but it could be useful and it's certainly easy to add.

Note, future queue will support an end-point called:
PUT /v1/task/<taskId>/runs/<runId>/artifacts/<name> 
So it would be powerful to have this, as with auth-proxy we could put dynamic artifacts with:

curl -X PUT -L taskcluster/v1/task/$TASKCLUSTER_TASKID/runs/$TASKCLUSTER_RUNID/artifacts/my-dynamic-artifact
Or something close to this :)
I added TASK_ID/RUN_ID which may not be specific enough but I could not bring myself to make it the more verbose version.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Component: TaskCluster → Docker-Worker
Product: Testing → Taskcluster
Component: Docker-Worker → Workers
You need to log in before you can comment on or make changes to this bug.