Ask AI

Reserved Dagster+ 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.


Reserved deployment variables#

The following variables are available in every deployment of your Dagster+ instance, including full (e.g., prod) and branch deployments.

PropertyDescription
DAGSTER_CLOUD_DEPLOYMENT_NAMEThe name of the Dagster+ deployment. For example, prod.
DAGSTER_CLOUD_IS_BRANCH_DEPLOYMENTIf 1, the deployment is a branch deployment. Refer to the Branch Deployment variables section for a list of variables available in branch deployments.

Reserved Branch Deployment variables#

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

For every commit made to a branch, the following metadata is available:

PropertyDescription
DAGSTER_CLOUD_GIT_SHAThe SHA of the commit.
DAGSTER_CLOUD_GIT_TIMESTAMPThe time the commit occurred.
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 are OPEN, CLOSED, and MERGED.