Skip to content

Commit

Permalink
Per #289, update the run_sonarqube.sh script to check that SONAR_TOKE…
Browse files Browse the repository at this point in the history
…N and SONAR_HOST_URL are both set.
  • Loading branch information
JohnHalleyGotway committed Apr 3, 2024
1 parent dc53495 commit ce61a67
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions internal/scripts/sonarqube/run_sonarqube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ function usage {
# Check for arguments
if [[ $# -lt 1 ]]; then usage; exit; fi

# Check that SONAR_TOKEN and SONAR_HOST_URL are defined
if [ -z ${SONAR_TOKEN} ]; then
echo "ERROR: SONAR_TOKEN must be set"
exit 1
fi
if [ -z ${SONAR_HOST_URL} ]; then
echo "ERROR: SONAR_HOST_URL must be set"
exit 1
fi

# Check that SONARQUBE_WRAPPER_BIN is defined
if [ -z ${SONARQUBE_WRAPPER_BIN} ]; then
which build-wrapper-linux-x86-64 2> /dev/null
Expand Down

0 comments on commit ce61a67

Please sign in to comment.