-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2765 from dtcenter/feature_2757_SonarQube_token
Feature 2757 sonar qube token
- Loading branch information
Showing
4 changed files
with
51 additions
and
38 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,9 +20,9 @@ | |
#======================================================================= | ||
|
||
# Constants | ||
#EMAIL_LIST="[email protected] [email protected] [email protected] [email protected] [email protected]" | ||
EMAIL_LIST="[email protected]" | ||
EMAIL_LIST="[email protected]" # overridden by $MET_CRON_EMAIL_LIST_MET or $MET_CRON_EMAIL_LIST | ||
KEEP_DAYS=5 | ||
GIT_REPO_NAME=MET | ||
|
||
function usage { | ||
echo | ||
|
@@ -65,8 +65,12 @@ LOGFILE=${RUN_DIR}/run_sonarqube_${TODAY}.log | |
# Run scan and check for bad return status | ||
${SCRIPT_DIR}/run_sonarqube.sh ${1} > ${LOGFILE} | ||
if [[ $? -ne 0 ]]; then | ||
echo "$0: The nightly SonarQube scan FAILED in `basename ${RUN_DIR}`." >> ${LOGFILE} | ||
cat ${LOGFILE} | mail -s "MET SonarQube scan Failed for ${1} in `basename ${RUN_DIR}` (autogen msg)" ${EMAIL_LIST} | ||
my_cmd="echo \$MET_CRON_EMAIL_LIST_${GIT_REPO_NAME}" | ||
_EMAIL_LIST="$(eval $my_cmd)" | ||
[ -z "$_EMAIL_LIST" ] && _EMAIL_LIST="$MET_CRON_EMAIL_LIST" | ||
[ -z "$_EMAIL_LIST" ] && _EMAIL_LIST="$EMAIL_LIST" | ||
echo "$0: The nightly SonarQube scanning for $GIT_REPO_NAME FAILED in `basename ${RUN_DIR}`." >> ${LOGFILE} | ||
cat ${LOGFILE} | mail -s "$GIT_REPO_NAME SonarQube scanning failed for ${1} in `basename ${RUN_DIR}` (autogen msg)" ${_EMAIL_LIST} | ||
exit 1 | ||
fi | ||
|
||
|
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
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