Information for: DEVELOPERS   PARTNERS

Default environment variables in pipelines

The pipelines feature provides the following environment variables for your use in your YAML file. For example build definition files, see Example pipelines build definition files.

The following variables are set by the system:

Variable name Description
BUILD_DIR The target directory into which the build artifact will be generated. Also known as PIPELINE_DEPLOY_WORKSPACE.
CDE_DEPLOY_POLL_TIMEOUT Used to set timeouts (in seconds) for the pipelines-deploy command without any limit. Default value is 600.
CI, CONTINUOUS_INTEGRATION With a value of true, indicates that this job is being run in a continuous integration context, rather than initiated directly by a human.
PIPELINE_APPLICATION_ID The application ID for this job’s pipeline.
PIPELINE_CLOUD_REALM The realm in which the application is running. For configuration information, see Realm requirements in Cloud Platform API v1.
PIPELINE_CLOUD_SITE The Cloud Platform application name or sitename that corresponds to the application ID.
PIPELINE_DEPLOY_VCS_PATH

The branch or tag that will hold the output of the job. Also known as DEPLOY_VCS_PATH. For more information, see The build artifact.

When using a Github branch during a job launched from a PR, the DEPLOY_VCS_PATH will include the PR number as shown in the following example:

SOURCE_VCS_PATH="master"
DEPLOY_VCS_PATH="pipelines-build-pr-<pr_number>"
PIPELINE_DEPLOY_WORKSPACE The deployment workspace.
PIPELINE_ENV With a value of true, indicates that this job is being run in a pipeline context.
PIPELINE_GIT_HEAD_REF A reference to the last commit in the Git repository.
PIPELINE_JOB_ID The job ID for this job. Also known as PIPELINES_JOB_ID.
PIPELINE_PORT_22 The port mapped to port 22.
PIPELINE_PORT_8007 The port mapped to port 8007.
PIPELINE_SSH_KEY Specifies which SSH key will be used in a script. For more information, see Linking to specific SSH keys with a variable and Encrypting keys and variables.
PIPELINE_STATUS With a value of running, indicates that this job is running in a pipeline context.
PIPELINE_VCS_PATH The path of the branch specified in the --vcs-path argument of the start command. Also known as SOURCE_VCS_PATH.
PIPELINES_CURRENT_EVENT The name of the current running event. See Events.
PIPELINES_ENCRYPTED_VARIABLES_AVAILABLE A flag to enable or disable decryption of variables.
PIPELINES_SCRIPT_DATA_FILE

The name of the file to save script execution data to. Deployment information is stored as shown in the following example if the pipelines-deploy command is executed through acquia-pipelines.yaml:

{"environment":{
"PIPELINES_DEPLOYMENT_NAME":"ode184",
"PIPELINES_DEPLOYMENT_LINK":
"http:\/\/odetopipelinesode184.prod.acquia-sites.com"
}}

Note

The PIPELINES_DEPLOYMENT_LINK variable is not available during runtime.

SOURCE_DIR The source directory containing the build instructions.
SYNC_DB_POLL_TIMEOUT Used to set timeouts (in seconds) for the pipelines-sync-dbs command without any limit. Default value is 1000.

For information about the variables key in your YAML file, see variables:. For details about including secure (encrypted) variables in the variables key, see Encrypting keys and variables.