Commit 3ff64b2e authored by Patrik Dufresne's avatar Patrik Dufresne

Add sonar to gitlab-ci

parent d8c8fcda
Pipeline #442 failed with stages
in 46 seconds
image: maven:3-jdk-7
image: maven:3-jdk-8
variables:
MAVEN_OPTS: "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN
......@@ -12,18 +12,24 @@ cache:
- .m2/repository
stages:
- test
- build
- deploy
- publish
before_script:
- export REVISION="$(curl http://git.patrikdufresne.com/pdsl/maven-scm-version/raw/master/version.sh | bash -)"
- echo "REVISION=$VERSION"
- echo "REVISION=$REVISION"
test:
stage: test
stage: build
script:
- mvn -B -Drevision=${REVISION} clean org.jacoco:jacoco-maven-plugin:prepare-agent install
- mvn -B -Drevision=${REVISION} -Dsonar.host.url=http://sonar.patrikdufresne.com -Dsonar.login=$SONAR_TOKEN clean install
sonar:
stage: build
allow_failure: true
script:
- mvn -B -Drevision=${REVISION} -Dsonar.host.url=http://sonar.patrikdufresne.com -Dsonar.login=$SONAR_TOKEN clean verify sonar:sonar
nexus_deploy:
stage: deploy
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment