Build Config Reference

Below, you find a reference for the entire build section. We recommend to only copy parts you need in your configuration, and otherwise use our defaults:

        # Sets up multi-environment builds, see
            # ... All other options under "build" except "nodes"

                # will only run when my-first-test passes
                - node: my-first-test

                # will only run when build is related to the "master" branch
                - branch: master

                # will only run when no failure conditions were met in the analysis
                - analysis

            # ... All other options under "build" except "nodes"

    # Defines the root path for your project, defaulting to the repository root directory.
    root_path: './'

    # Allows you to allocate more CPU bandwidth to your build environment if your tests
    # benefit from running on multiple CPU threads. The number of CPUs is limited by the
    # number of containers in your subscription.
        cpus: 1

        # Any valid timezone identifier
        # see TZ column on
        timezone:             UTC

        # Sets up DNS entries for certain hosts

        # Any environment variables we should set for you.
            FOO:                  bar
            ANOTHER_VAR:          baz

        # Your heroku credentials for deployment if needed.
        # Recommended to be kept on the website only.
            email:                [email protected]
            api_key:              heroku-api-key

        # Your aws credentials for the aws CLI used for deployment or other tasks.
        # Recommended to be kept on the website only.
            key:                  aws-key-here
            secret:               aws-secret-here

        # Languages
            version:              "7.0"
                memory_limit:     "-1"

        java:                     "java-8-oracle"
        python:                   "3.5.0"
        ruby:                     "2.3.1"
        node:                     "v6.2.0"
        go:                       "go1.6.2"

        # Various pre-installed services that can be configured.
            - { username: "user", password: "s3cret", server: "" }
            - # more logins

                - "scrutinizer/web:tag-name"
                - "scrutinizer/*"

        mysql:                    5.5
        postgresql:           true
        redis:                true
            modules:              []
                    host: # also make sure to add under "hosts" above
                    web_root:  web/
                        - RewriteRule # ...
                        - AnotherEntry # will be added to the <VirtualHost> entry of this site

                # will add configuration file to "/etc/nginx/sites-enabled"
                    host: ''
                    web_root: 'web/'

                    # These are optional and usually do not require changing.
                    index: 'index.php index.html'

                        - >
                           location ~ [^/]\.php(/|$) {
                               try_files $uri $uri/ /index.php /index.html;
                               fastcgi_index index.php;
                               fastcgi_split_path_info ^(.+?\.php)(/.*)$;
                               include fastcgi_params;

        elasticsearch:        "2"
        rabbitmq:             false
        mongodb:              false
        neo4j:                false
        memcached:            false
            version:                2.53
            chrome_driver_version:  2.22
            browser_name:           ~     # can also be set from your tests

    ## Minimal Nodes Options

        - simple-command-string

        # or full command hash
            command:              some-command
            cwd:                  .

            # How long in seconds we should wait for the command to produce some output before
            # we consider it broken and terminate it.
            idle_timeout:         180

                SOME_KEY:         VALUE
                ANOTHER_KEY:      VALUE

            # The title is displayed in the UI. It defaults to the command itself, but you can
            # overwrite it if your command is very long and not very descriptive.
            title: "Compile ABC"

            # If true, this command will be run in the background.
            background:           false

            # A node number, when you want to run builds in parallel. You can configure any number here.
            # All commands with the same number will be run in the same container. Commands with no
            # explicit number configured will run in all containers.
            on_node:              ~  # 1, 2, 3, and so on

            # If you run browser based tests. You can have Scrutinizer record a video of the
            # display so that you can more easily debug any errors that occur. The video is
            # done in a low overhead format and only re-encoded when your tests actually fail.
            # Should your tests pass, the video is discarded.
            record_video: false

            # Helpers to execute a command conditionally, accepts any command valid command.
            # Useful if you want to cache an expensive compilation for example.
            only_if:              "test -e command-is-only-executed-if-this-path-exists"
            not_if:               ~

            # Optional. If the command produces a coverage file, you can let the platform know where and
            #           what format it has, so we can correctly process it and show you the results.
            #           See dedicated code coverage section for details.
                file:                 ~
                config_file:          ~
                format:               ~

            # Optional. If the command produces analysis results, sometimes it's necessary to explicit
            #           configure the result file and its format. See dedicated open-source tools
            #           section for details.
                file:                 ~
                format:               ~

    ## Auto-Setup Nodes Options

        disabled:             false

        # Accepts an array of directories
            - ~/relative-to-the-users-home
            - ~/.m2

            - or-relative-to-your-project
            - vendor/

    # Used for installing any needed dependencies by your project like apt package or libraries.
        # Commands that should be run before the inferred commands in the dependencies section
            - simple-command

            # or a command hash
                command: some-command
                # ..., see Minimal Nodes Options above for all options of this hash.

        # Commands that should be run instead of the inferred commands in the dependencies section.
            # Same format as above in "before".
            # If you want to override the inferred commands, you can move your entire "before"
            # and "after" commands into the "override" section. If you do not have any commands
            # in those sections, you can also just add "true" as command which is bash built-in.

        # Commands that should be run after the inferred commands in the dependencies section.
            # Same format as above in "after".
            # Useful if you want to keep the inferred commands, and just add something
            # after they have run.

    # Follows the same structure like the dependencies section.
    # Used for project setup like configuring the database, preparing the schema, importing fixtures, etc.
        before: []
        override: []
        after: []

    # Follows the same structure like the dependencies section.
    # Used for running your tests and open-source analysis tools.
    # We will execute all commands even if one of them fails.
        # If true, tests execution will stop by any command failure.
        stop_on_failure: true
                stop_on_failure: true # If true, tests execution will stop when this command failed.
        override: []
        after: []

    # Used for deployment.
    # Will only be executed if all tests succeeded.
    # If run in parallel, will be executed in the container where tests finish last.
            # Optional. If this should only be executed for pushes to a certain branch.
            branch: master            # The branch name is exactly "master"
            branch: '/^feature/'      # Any branch name that starts with "feature"

                - aws s3 cp my-file s3://my-bucket/my-file
                - git push heroku master
                - or-any-other-command