Available Environment Variables
Before running your build, Semaphore exports the following environment variables:
CI=true
SEMAPHORE=true
BRANCH_NAME=#{current_branch_name}
RACK_ENV=test
RAILS_ENV=test
WKHTMLTOPDF_PATH
SEMAPHORE_PROJECT_HASH_ID
SEMAPHORE_BRANCH_ID
SEMAPHORE_BUILD_NUMBER
SEMAPHORE_REPO_SLUG
The following apply if you are using a MySQL or PostgreSQL database. You can use them in any custom scripts that your build depends on:
DATABASE_USERNAME DATABASE_NAME_DEVELOPMENT DATABASE_NAME_TEST DATABASE_PASSWORD