docker-worker: add env variables TASKCLUSTER_TASKID and TASKCLUSTER_RUNID

RESOLVED FIXED

Status

Taskcluster
Docker-Worker
--
enhancement
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: jonasfj, Unassigned)

Tracking

Details

(Reporter)

Description

4 years ago
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
Last Resolved: 4 years ago
Resolution: --- → FIXED
Component: TaskCluster → Docker-Worker
Product: Testing → Taskcluster
You need to log in before you can comment on or make changes to this bug.