Loading...

Default environment variables in Pipelines

Pipelines 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 nameDescription
BUILD_DIRThe target directory into which the build artifact will be generated. Also known as PIPELINE_DEPLOY_WORKSPACE.
CDE_DEPLOY_POLL_TIMEOUTUsed to set timeouts (in seconds) for the pipelines-deploy command without any limit. Default value is 600.
CI, CONTINUOUS_INTEGRATIONWith a value of true, indicates that this job is being run in a continuous integration context, rather than initiated directly by a human.
npm_config_ignore_scriptsPrevents npm from running scripts during the build process for enhanced security. The default value is true. You must manually update the value to false to use npm scripts.
PIPELINE_APPLICATION_IDThe application ID for this job’s pipeline.
PIPELINE_CLOUD_REALMThe realm in which the application is running.
PIPELINE_CLOUD_SITEThe Cloud Platform application name or sitename that corresponds to the application ID.
PIPELINE_DEPLOY_VCS_PATH

The branch or tag that holds the output of the job. This variable is also known as DEPLOY_VCS_PATH. For more information, see build artifact.

When using a GitHub branch during a job launched from a PR, the DEPLOY_VCS_PATH includes the PR number as shown in the following example:

SOURCE_VCS_PATH="master"
DEPLOY_VCS_PATH="pipelines-build-pr-<pr_number>"
PIPELINE_DEPLOY_WORKSPACEThe deployment workspace.
PIPELINE_ENVWith a value of true, indicates that this job is being run in a pipeline context.
PIPELINE_GIT_HEAD_REFA reference to the last commit in the Git repository.
PIPELINE_JOB_IDThe job ID for this job. Also known as PIPELINES_JOB_ID.
PIPELINE_PORT_22The port mapped to port 22.
PIPELINE_PORT_8007The port mapped to port 8007.
PIPELINE_SSH_KEYSpecifies 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_STATUSWith a value of running, indicates that this job is running in a pipeline context.
PIPELINE_VCS_PATHThe path of the branch specified in the --vcs-path argument of the start command. Also known as SOURCE_VCS_PATH.
PIPELINES_CURRENT_EVENTThe name of the current running event. See Events.
PIPELINES_ENCRYPTED_VARIABLES_AVAILABLEA 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_DIRThe source directory containing the build instructions.
SYNC_DB_POLL_TIMEOUTUsed to set timeouts (in seconds) for the pipelines-sync-dbs command without any limit. Default value is 1000.
YARN_ENABLE_SCRIPTSPrevents Yarn from running scripts during the build process for enhanced security. The default value is false. You must manually update the value to true to use Yarn scripts.

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.

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Back to Section navigation
Back to Site navigation