Last active
January 23, 2019 14:47
-
-
Save guiwoda/b71fcabb6fd1a66200d5b2958d63f807 to your computer and use it in GitHub Desktop.
Run sonarqube analysis
This file contains 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 | |
if [ "$PULL_REQUEST_NUMBER" == "false" ]; then | |
~/sonar-scanner/sonar-scanner-2.8/bin/sonar-scanner -Dsonar.analysis.mode=preview \ | |
-Dsonar.github.repository=$SEMAPHORE_REPO_SLUG \ | |
-Dsonar.github.oauth=$GITHUB_TOKEN \ | |
-Dsonar.host.url=$SONAR_HOST_URL \ | |
-Dsonar.login=$SONAR_TOKEN | |
else | |
~/sonar-scanner/sonar-scanner-2.8/bin/sonar-scanner -Dsonar.analysis.mode=preview \ | |
-Dsonar.github.pullRequest=$PULL_REQUEST_NUMBER \ | |
-Dsonar.github.repository=$SEMAPHORE_REPO_SLUG \ | |
-Dsonar.github.oauth=$GITHUB_TOKEN \ | |
-Dsonar.host.url=$SONAR_HOST_URL \ | |
-Dsonar.login=$SONAR_TOKEN | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment