edit

Available Environment Variables

Interactive available Environment Variables list

In the Workflow Editor on bitrise.io you can click into any input field of a Step and a green Insert Variable button will appear.

Click this button and you'll get a full list of available Environment Variables. You can search in this list, and when you find the one you're looking for just click it, and it'll be inserted into the input field for you.

This is an interactive list, which includes Environment Variables generated by previous Steps! This means, that if you click into an input of the third Step of your Workflow, the list will include all the Environment Variables (outputs) generated by the first and second Steps, but not the ones which will be generated by the forth, fifth, ... Steps.

Exposed by the Bitrise CLI

These Environment Variables are available everywhere, even if you run the build on your own Mac (using the Bitrise CLI):

  • BITRISE_TRIGGERED_WORKFLOW_ID : the Workflow's ID which was triggered, either with bitrise run or bitrise trigger
  • BITRISE_TRIGGERED_WORKFLOW_TITLE : the Workflow's title (if you provided one) which was triggered, either with bitrise run or bitrise trigger
  • BITRISE_BUILD_STATUS : current status of the build - "0" if there are no failed steps yet, "1" if there's at least one failed step
  • BITRISE_SOURCE_DIR : path of source / base workdir. By default it's the directory where bitrise runs (e.g. your repository root), unless you provide a different value. Can be overwritten during the build, which will change the working directory for subsequent Steps in the build.
  • BITRISE_DEPLOY_DIR : directory to store artifacts / files for deploy. It's a temporary directory created by bitrise CLI by default, and can be overwritten before starting bitrise CLI. The content of this directory can be attached to the bitrise.io build page, as artifacts, with the Deploy to Bitrise.io step for example.
  • CI : indicates whether bitrise CLI is running in CI (Continuous Integration) mode. Value can be "true" or "false".
  • PR : indicates whether bitrise CLI is running in PR (Pull Request) mode. Value can be "true" or "false".

Exposed by Bitrise.io

These environments are available for builds running on bitrise.io Virtual Machines:

  • BITRISE_BUILD_NUMBER : build number of the build on bitrise.io
  • BITRISE_APP_TITLE : app title on bitrise.io
  • BITRISE_APP_URL : app URL on bitrise.io
  • BITRISE_APP_SLUG : app slug on bitrise.io
  • BITRISE_BUILD_URL : build's URL on bitrise.io
  • BITRISE_BUILD_SLUG : build's slug on bitrise.io
  • BITRISE_BUILD_TRIGGER_TIMESTAMP : triggered at timestamp of the build
  • GIT_REPOSITORY_URL : git repository URL
  • BITRISE_GIT_BRANCH : the branch which triggered the build (if any)
  • BITRISE_GIT_TAG : tag which triggered the build (if any)
  • BITRISE_GIT_COMMIT : commit hash which triggered the build (if any)
  • BITRISE_GIT_MESSAGE : commit message - or the message you specified if you triggered the build manually
  • BITRISE_PULL_REQUEST : Pull Request ID, which triggered the build (if any)
  • BITRISE_PROVISION_URL : Provisioning Profile(s) URL - the ones uploaded to bitrise.io. Pipe character (|) separated list, in case more than one value is provided.
  • BITRISE_CERTIFICATE_URL : Certificate / Identity URL - the one uploaded to bitrise.io. Pipe character (|) separated list, in case more than one value is provided.
  • BITRISE_CERTIFICATE_PASSPHRASE : Certificate / Identity's password / passphrase, the one specified on bitrise.io. Pipe character (|) separated list, in case more than one value is provided.