Solano CI Set Environment VariablesΒΆ

Solano CI sets a number of environment variables before it runs each of your test scripts. You should not need to examine most of these environment variables and you should not change the value of any of them.

In some cases it is convenient or necessary to know that your application is running in the Solano CI environment. The right way to do so is to check to see if the TDDIUM environment variable is set.

Solano CI exports the current branch and commit to the environment although it is usually preferrable to use your SCM directly to extract this information. In this context, CURRENT refers to the currently checked-out code (head in Github Pull Request parlance). PR refers to the base branch and commit for the PR (base in Github PR parlance).

  • TDDIUM_CURRENT_BRANCH
  • TDDIUM_CURRENT_COMMIT
  • TDDIUM_PR_REPO - name of request repository (cross-repo PRs)
  • TDDIUM_PR_ID - pull request ID; for Github users this is the PR number
  • TDDIUM_PR_URL - pull request URL
  • TDDIUM_PR_BRANCH - pull request branch as reported by your SCM host
  • TDDIUM_PR_COMMIT - pull request commit
  • TDDIUM_LAST_BRANCH_PASSED_SESSION_ID - The numeric session ID of the last passing branch of this repo
  • TDDIUM_LAST_BRANCH_PASSED_COMMIT- The SCM commit ID for the latest commit built in TDDIUM_LAST_BRANCH_PASSED_SESSION_ID

Solano CI also sets a number of environment variables for post build hooks:

  • TDDIUM_MODE - Set to “ci” when running in Continuous Integration (as opposed to interactive/pre-push) mode
  • TDDIUM_BUILD_STATUS - the status of the current build (one of failed, passed, or unknown)
  • TDDIUM_LAST_BUILD_STATUS - the status of the previous build

Solano CI also sets the following environment variables that are specific to the Solano environment:

  • TDDIUM - set if running in the Solano CI environment
  • TDDIUM_TID - per-instance Solano CI thread ID
  • TDDIUM_TMPDIR - path to a per-thread temporary directory for use by tests
  • TDDIUM_SESSION_ID - the session ID for the current Solano CI session
  • TDDIUM_TEST_EXEC_ID - the ID for the current running test script
  • TDDIUM_REPO_ROOT - path to the root of the repository under test
  • TDDIUM_REPO_CONFIG_DIR - $TDDIUM_REPO_ROOT/config, expanded
  • SOLANO_PROFILE_NAME - The name of the current profile for this build (aka TDDIUM_PROFILE_NAME)

The following values are used to provide access to relational databases supported by Solano CI:

  • TDDIUM_DB_ADAPTER - name of the current database adapter
  • TDDIUM_DB_NAME - the name of the current database instance
  • TDDIUM_DB_USER
  • TDDIUM_DB_PASSWORD

Note that Solano CI also sets TDDIUM_DB_PG_ADAPTER, TDDIUM_DB_MYSQL_ADAPTER, and TDDIUM_DB_SQLITE_ADAPTER, etc. for Postgres, MySQL, and SQLite, respectively.

Solano CI sets a number of environment variables to be compatible with many hosted services used by the community, including:

  • SELENIUM_RC_HOST - Selenium RC host to connect to. Usually ‘localhost’.
  • MONGODB_URL
  • MONGOHQ_URL
  • REDIS_URL
  • REDISTOGO_URL
  • SOLR_URL

The following is a partial list of service-specific environment variables. You can retrieve a current list by starting a debug console and using printenv. We recommend against using these values unless absolutely necessary.

  • TDDIUM_ES_HOST
  • TDDIUM_ES_HTTP_PORT
  • TDDIUM_ES_TCP_PORT
  • TDDIUM_ES_NODE_NAME
  • TDDIUM_ES_CLUSTER_NAME
  • TDDIUM_MEMCACHE_HOST
  • TDDIUM_MEMCACHE_USER
  • TDDIUM_MEMCACHE_PORT
  • TDDIUM_MEMCACHE_NAMESPACE
  • TDDIUM_MONGOID_DB - Mongo DB database
  • TDDIUM_MONGOID_HOST - Mongo DB connection information
  • TDDIUM_MONGOID_PORT
  • TDDIUM_MONGOID_USER
  • TDDIUM_MONGOID_PASSWORD
  • TDDIUM_REDIS_DB - Redis database
  • TDDIUM_REDIS_HOST - Redis connection information
  • TDDIUM_REDIS_PORT
  • TDDIUM_REDIS_PASSWORD
  • REDIS_URL
  • NEO4J_HOST
  • NEO4J_PORT
  • TDDIUM_SPHINX_PORT
  • TDDIUM_SPHINX_HOST
  • TDDIUM_SPHINX_USER
  • TDDIUM_SOLR_PORT
  • TDDIUM_SOLR_HOST
  • RABBITMQ_URL
  • TDDIUM_RIAK_HOST
  • TDDIUM_RIAK_JS_DIR
  • TDDIUM_RIAK_BIN_DIR
  • TDDIUM_RIAK_ROOT_DIR
  • TDDIUM_RIAK_PB_PORT
  • TDDIUM_RIAK_HTTP_PORT