2017-02-27 20:35:17 +01:00
|
|
|
#!/bin/bash
|
2017-05-20 10:16:29 +02:00
|
|
|
set -e
|
2017-02-27 20:35:17 +01:00
|
|
|
|
2017-05-20 09:55:09 +02:00
|
|
|
source .travis/common-functions.sh
|
2017-05-15 21:11:43 +02:00
|
|
|
|
|
|
|
VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec | tail -1)
|
|
|
|
echo "Building PMD Sonar ${VERSION} on branch ${TRAVIS_BRANCH}"
|
|
|
|
|
2017-05-20 10:43:14 +02:00
|
|
|
if ! travis_isPush; then
|
2017-05-15 21:11:43 +02:00
|
|
|
echo "Not updating sonar, since this is not a push!"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2017-02-27 20:35:17 +01:00
|
|
|
# Run the build, redirect output into the file
|
2017-06-21 18:06:58 -03:00
|
|
|
travis_wait ./mvnw clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.host.url=https://sonarqube.com -Dsonar.login=${SONAR_TOKEN} -B -V
|
2017-02-27 20:35:17 +01:00
|
|
|
|