Build environment

Base Image

Our base image uses Ubuntu 14.04, and installs many packages that are commonly used.

Environment Variables

We set the following environment variables by default:

SCRUTINIZER true
CI true
DISPLAY :99
SCRUTINIZER_BRANCH The branch that this inspection belongs to. For pull requests, this equals the target branch.
SCRUTINIZER_PR_NUMBER The number of the pull request if the inspection refers to a pull request, otherwise not set.
SCRUTINIZER_PR_SOURCE_BRANCH The source branch if the inspection refers to a pull request, otherwise not set
SCRUTINIZER_SHA1 The revision of the head commit. For pull requests, this equals the merge commit sha on GitHub, and the head sha of the source branch on Bitbucket.
SCRUTINIZER_INSPECTION_UUID The UUID of the inspection.
SCRUTINIZER_PROJECT Your project?s qualified name, f.e. g/scrutinizer-ci/worker for GitHub hosted projects, or b/scrutinizer-ci/worker for projects hosted on Bitbucket.

Browsers & GUIs

Scrutinizer runs an instance of xvfb in all build environments and automatically sets the DISPLAY environment variable. This means that your browser-based tests should just work as if you were running them locally.

Headless browser interfaces have access to:

  • phantomjs 1.9.7 (via phantomjs), you can also install other versions with npm install phantomjs-prebuilt
  • capserjs 1.0.2 via casperjs1.0
  • capserjs 1.1.0 via casperjs
  • libwebkit (2.4.10)

Browser-based tests have access to:

  • Firefox 46.0.1
  • Google Chrome 50.0.2661
  • Chromedriver 2.21
  • Selenium 2.53
Note: Learn more about debugging browser-based tests.

Languages

We install a range of languages in many different versions. If a version that you need is not listed here, contact us and we will install it for you.

Java

We install several Java versions, and currently support the following versions:

java-1.7.0-openjdk-amd64, java-7-oracle, and java-8-oracle

build:
    environment:
        java: java-8-oracle

Node

We install a few node versions by default. If you specify a version which is not listed here, it will automatically be downloaded and installed in your build environment.

Pre-installed versions:

0.10.29, 0.11.13, 0.12.4, v4.2.2, v5.1.0, v6.2.0, iojs-v1.3.0, iojs-v1.8.4, iojs-v2.5.0, iojs-v3.3.1

build:
    environment:
        node: v6.2.0

For node, we also support installation of any released version on-the-fly. You can type nvm ls-remote in SSH debug mode to retrieve a list of all available versions.

PHP

We use phpenv for managing PHP versions and currently support the following versions:

5.4.41, 5.5.25, 5.6.9, 5.6.16, 7.0.8, 7.0.20, 7.1.1, 7.1.6 and hhvm

build:
    environment:
        php: 7.0.6

Python

We use pyenv for managing Python versions and currently support the following versions:

2.7.7, 3.2.5, 3.3.5, 3.4.1, 3.4.6, 3.5.0, 3.6.0, jython-2.5.3, jython-2.7.0, pypy-2.3.1, stackless-3.3.5, pypy-2.4.0, pypy-2.6.1, pypy-4.0.0, pypy-5.6.0, pypy2-5.6.0, pypy3-2.4.0, stackless-3.4.1

build:
    environment:
        python: 3.5.0

Ruby

We use rbenv for managing Ruby versions and currently support the following versions:

1.8.7-p375, 1.9.2-p320, 1.9.3-p547, 2.0.0-p481, 2.1.2, 2.1.5, 2.2.0, 2.2.3, 2.3.1, 2.4.0, jruby-1.7.9, 'jruby-1.7.19, jruby-9.0.4.0, jruby-9.1.1.0

build:
    environment:
        ruby: 2.3.1

Go

We use gvm for manging Go versions and currently support the following versions:

go1.4.2, go1.3.3, go1.5.1 and go1.6.2

build:
    environment:
        go: go1.6.2

Scala SBT

We install several scala sbt versions. The following are supported currently:

sbt-0.12.4, sbt-0.13.2

Services

The default environment comes with many commonly used services pre-installed:

build:
    environment:
        mysql: 5.5             # 5.5 or 5.6 or 5.7

        postgresql: true

        mongodb: true          # Version 2

        elasticsearch: 1       # 1 or 2

        redis: true
        memcached: true
        neo4j: true            # Version 3
        rabbitmq: true