pmd/.travis/build-sonar.sh
Andreas Dangel 8b109f9981 [ci] let's try the quiet option (-q) of maven
travis_wait_truncated doesn't work, since the pipes are buffered...
2017-07-08 13:10:32 +02:00

18 lines
597 B
Bash

#!/bin/bash
set -e
source .travis/common-functions.sh
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}"
if ! travis_isPush; then
echo "Not updating sonar, since this is not a push!"
exit 0
fi
# Run the build, truncate output due to Travis log limits
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 -q