X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fautorelease%2Fnotify-build-failure.sh;h=939c46b5ef06883c1f7fbf1663510f31e91af62d;hb=fd30d76b2e0783f0cd3a1da4d473c8bc0906da0a;hp=090e808039b1213b3c39127328813fc179737234;hpb=e781ea36786462732170fb4ead81b39d930fc9bd;p=releng%2Fbuilder.git diff --git a/jjb/autorelease/notify-build-failure.sh b/jjb/autorelease/notify-build-failure.sh index 090e80803..939c46b5e 100644 --- a/jjb/autorelease/notify-build-failure.sh +++ b/jjb/autorelease/notify-build-failure.sh @@ -11,6 +11,8 @@ # This script parses the console log to discover which project has caused a # build failure and notify the project as appropriate. +echo "---> notify-build-failure.sh" + NEWLINE=$'\n' RELEASE_EMAIL="release@lists.opendaylight.org" ARCHIVES_DIR="$JENKINS_HOSTNAME/$JOB_NAME/$BUILD_NUMBER" @@ -69,6 +71,7 @@ if [ ! -z "$ARTIFACT_ID" ]; then --else -o ""\ "$p" 2>/dev/null) if [ ! -z "${GROUP}" ]; then + # shellcheck disable=SC2207 grouplist+=($(echo "${GROUP}" | awk -F'.' '{ print $3 }')) fi done < <(find . -name "pom.xml") @@ -78,11 +81,11 @@ if [ ! -z "$ARTIFACT_ID" ]; then elif [ "${#grouplist[@]}" -gt 1 ]; then GROUPLIST="NOTE: The artifactId: $ARTIFACT_ID matches multiple groups: ${grouplist[*]}" else - echo "Failed to determine project.groupId using xpaths" + echo "Unable to determine project.groupId using xpaths" fi else - echo "Failed to determine ARTIFACT_ID" - exit 1 + echo "Unable to determine failed ARTIFACT_ID. Build likely successful or bug in this script." + exit 0 fi # Construct email subject & body