X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fautorelease%2Fnotify-build-failure.sh;h=805a1fa8f093581af20532149440ddc4d3175d0b;hb=5ce4f06525658e4621c69593e1b40f80dabc893b;hp=a5c5c82bbe10b2678f94d9b70747fe009793ffa1;hpb=7154454605f0ac309e19c9adffb185771ac9be3f;p=releng%2Fbuilder.git diff --git a/jjb/autorelease/notify-build-failure.sh b/jjb/autorelease/notify-build-failure.sh index a5c5c82bb..805a1fa8f 100644 --- a/jjb/autorelease/notify-build-failure.sh +++ b/jjb/autorelease/notify-build-failure.sh @@ -60,7 +60,7 @@ ARTIFACT_ID=$(awk -F: '/\[ERROR\].*mvn -rf :/ { print $2}' $CONSOLE_LOG) # project.groupId is not set but IS inherited from project.parent.groupId # else # exclude project mailing list -if [ ! -z "$ARTIFACT_ID" ]; then +if [ -n "$ARTIFACT_ID" ]; then grouplist=() while IFS="" read -r p; do GROUP=$(xmlstarlet sel\ @@ -72,7 +72,7 @@ if [ ! -z "$ARTIFACT_ID" ]; then -v "/x:project/x:parent/x:groupId"\ --else -o ""\ "$p" 2>/dev/null) - if [ ! -z "${GROUP}" ]; then + if [ -n "${GROUP}" ]; then # shellcheck disable=SC2207 grouplist+=($(echo "${GROUP}" | awk -F'.' '{ print $3 }')) fi @@ -107,7 +107,7 @@ Autorelease $STREAM failed to build $ARTIFACT_ID$PROJECT_STRING in build $BUILD_NUMBER. \${!ATTACHMENT} ${PROJECT:+${NEWLINE}${GROUPLIST}} Console Logs: -https://logs.opendaylight.org/$SILO/$ARCHIVES_DIR +https://s3-logs.opendaylight.org/logs/$SILO/$ARCHIVES_DIR Jenkins Build: $BUILD_URL @@ -122,7 +122,8 @@ ODL releng/autorelease team BUILD_STATUS=$(awk '/\[INFO\] Remote staging finished/{flag=1;next}/Total time:/{flag=0}flag' $CONSOLE_LOG \ | grep '\] BUILD' | awk '{print $3}') -if ([ ! -z "${NAME}" ] || [ ! -z "${ARTIFACT_ID}" ]) && [[ "${BUILD_STATUS}" != "SUCCESS" ]]; then +# shellcheck disable=SC2235 +if ([ -n "${NAME}" ] || [ -n "${ARTIFACT_ID}" ]) && [[ "${BUILD_STATUS}" != "SUCCESS" ]]; then # project search pattern should handle both scenarios # 1. Full format: ODL :: $PROJECT :: $ARTIFACT_ID # 2. Partial format: Building $ARTIFACT_ID