-
-
Save prashanth-sams/7bc8b285b97bcdb97ea99d86499c6800 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