Created
September 28, 2016 20:38
-
-
Save raincatcher-bot/01ac4cdb3b0770bdb58489dbc17ed6b6 to your computer and use it in GitHub Desktop.
Run sonarqube analysis on travis via docker image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ev | |
if [ -v SONAR_TOKEN ]; then | |
docker pull pierrevincent/sonar-runner | |
SONAR_OPTIONS="-Dsonar.login=$SONAR_TOKEN" | |
if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then | |
SONAR_OPTIONS="$SONAR_OPTIONS -Dsonar.github.oauth=$SONAR_GITHUB -Dsonar.github.pullRequest=$TRAVIS_PULL_REQUEST -Dsonar.analysis.mode=issues" | |
fi | |
docker run --rm -v $(pwd):/data pierrevincent/sonar-runner $SONAR_OPTIONS | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment