Standard Environment Variables


Taskcluster defines several environment variables, with the following meanings. Each section also describes the conditions where a Taskcluster component sets the variable, and those where a component expects the variable to be set.

TASKCLUSTER_ROOT_URL

TASKCLUSTER_ROOT_URL is the root URL for the current Taskcluster deployment. It is typically set during task execution by worker implementations. The value is used by client libraries by calling functions like fromEnvVars or optionsFromEnvironment.

The root URL serves as a scope for TASKCLUSTER_CLIENT_ID, etc. which only have meaning in a single deployment.

TASKCLUSTER_CLIENT_ID

TASKCLUSTER_CLIENT_ID is the clientId to use for Taskcluster API calls.

This is read by client libraries using functions like fromEnvVars or optionsFromEnvironment. The taskcluster-cli command taskcluster signin sets this and related variables in a shell environment.

TASKCLUSTER_ACCESS_TOKEN

TASKCLUSTER_ACCESS_TOKEN contains the accessToken for the clientId given in TASKCLUSTER_CLIENT_ID, and is handled in just like that variable.

TASKCLUSTER_CERTIFICATE

TASKCLUSTER_CERTIFICATE contains the certificate for the clientId given in TASKCLUSTER_CLIENT_ID, and is only present if the client is a temporary client. This variable is handled just like TASKCLUSTER_CLIENT_ID.

TASKCLUSTER_PROXY_URL

TASKCLUSTER_PROXY_URL defines the URL of a local taskcluster-proxy instance that can proxy requests on behalf of the current task. It is typically set during task execution by worker implementations, if taskcluster-proxy is supported. The URL can be treated like a root URL, but one that does not require any clientId, accessToken, or certificate. For example, it can be passed to a client constructor as in new Auth({rootUrl: process.environ['TASKCLUSTER_PROXY_URL']}).