Skip to content

ENVIRONMENT VARIABLES

continuousphp supports using environment variables at every stage of your builds :

Encryption

Environment Variables can (optionally) be encrypted. Pay attention that, once a variable is encrypted, you can no longer obtain it's value. An encrypted Environment Variable can only be decrypted during a build by continuousphp's workers. Encrypted Environment Variables will be masked in the build output.

When creating the Test Package

You can use Environment Variables during the creation of the Testing Package. Simply go to the Build Settings (step 1 of the pipeline configuration) and add one or more Environment Variables :

Build Settings Env Vars

When creating the Deployment Package

You can use Environment Variables during the creation of the Deployment Package. Simply go to the Package Settings (step 3 of the pipeline configuration) and add one or more Environment Variables :

Package Settings Env Vars

During the tests

You can use Environment Variables during the tests. Simply go to the Test Settings (step 2 of the pipeline configuration), then open the configuration of the testing framework and add one or more Environment Variables :

During the deployment

You can use Environment Variables in the continuousphp Script Deployment.

Built-In Environment Variables

continuousphp provides you with a set of built-in environment variables that you can use at every stage in your Pipeline :

  • CONTINUOUSPHP : continuousphp (can be used by your app to identify the environment)
  • GITHUB_TOKEN : Your GitHub API token (if connected with GitHub)
  • CPHP_BUILD_ID : The ID of the current build
  • CPHP_GIT_COMMIT : The git commit ID of the current build
  • CPHP_GIT_REF : The git reference of the current build
  • CPHP_BUILT_BY : The username of the person who started the build
  • CPHP_PR_ID : The Pull Request number of the current build (empty if it's no Pull Request)
  • CPHP_TOKEN : Your continuousphp API token (can be used by the SDK to download packages e.g.)