stages:
    - build
    - test

build:
    stage: build
    script: "mvn clean test -B"

sonar:
    stage: test
    script: "mvn verify sonar:sonar -B -Dsonar.host.url=https://sonarqube.johnnei.org -Dmaven.test.failure.ignore=true"

stages:
    - build
    - test
    - qa

# Cache Maven output
cache:
    key: "$CI_BUILD_NAME/$CI_BUILD_REF_NAME"
    untracked: true

# Compile the code, must succeed before we start testing.
build:
    stage: build
    script: "mvn clean compile -B"

# Run the quick test suite (Unit tests mostly)
quicktests:
    stage: test
    script: "mvn test -B"

# Run the integration test suite (Unit tests which don't use mocks and commonly exclude mock usages)
integration-tests:
    stage: test
    script: "mvn verify -B"
    allow_failure: true

# Run a sonar analysis.
sonar:
    stage: qa
    script: "mvn sonar:sonar -B -Dsonar.host.url=https://sonarqube.johnnei.org"

Split up the build jobs into separate jobs.
JBT-34: Split up the build jobs into separate jobs.

This will increase the ability to monitor individual phase degradations.
