Skip to main content

Built-in environment variables

Dagster+ provides a set of built-in, automatically populated environment variables, such as the name of a deployment or details about a branch deployment commit, that can be used to modify behavior based on environment.

All deployment variables

The following variables are available in every deployment of your Dagster+ instance.

KeyValue
DAGSTER_CLOUD_DEPLOYMENT_NAMEThe name of the Dagster+ deployment.

Example: prod.
DAGSTER_CLOUD_IS_BRANCH_DEPLOYMENT1 if the deployment is a branch deployment.

Branch deployment variables

The following environment variables are available only in a branch deployment.

For every commit made to a branch, the following environment variables are available:

KeyValue
DAGSTER_CLOUD_GIT_SHAThe SHA of the commit.
DAGSTER_CLOUD_GIT_TIMESTAMPThe Unix timestamp in seconds when the commit occurred.

Example: 1724871941
DAGSTER_CLOUD_GIT_AUTHOR_EMAILThe email of the git user who authored the commit.
DAGSTER_CLOUD_GIT_AUTHOR_NAMEThe name of the git user who authored the commit.
DAGSTER_CLOUD_GIT_MESSAGEThe message associated with the commit.
DAGSTER_CLOUD_GIT_BRANCHThe name of the branch associated with the commit.
DAGSTER_CLOUD_GIT_REPOThe name of the repository associated with the commit.
DAGSTER_CLOUD_PULL_REQUEST_IDThe ID of the pull request associated with the commit.
DAGSTER_CLOUD_PULL_REQUEST_STATUSThe status of the pull request at the time of the commit.

Possible values: OPEN, CLOSED, and MERGED.