Create Neon jobs and bump fluorine branch
[releng/builder.git] / jjb / autorelease / notify-build-failure.sh
index 0e3fe29b4f3fed4d86795a2716cbe4bea83cae62..7eefa4043a0322fca793e253466cd4796ea4fe88 100644 (file)
@@ -38,9 +38,11 @@ REACTOR_INFO=$(awk '/Reactor Summary:/ { flag=1 }
 # check for project format
 if [[ ${REACTOR_INFO} =~ .*::*.*::*. ]]; then
     # extract project and artifactId from full format
-    ODL=$(echo "${REACTOR_INFO}" | awk -F'::' '{ gsub(/^[ \t]+|[ \t]+$/, "", $1); print $1 }')
-    PROJECT_=$(echo "${REACTOR_INFO}" | awk -F'::' '{ gsub(/^[ \t]+|[ \t]+$/, "", $2); print $2 }')
-    NAME=$(echo "${REACTOR_INFO}" | awk -F'::' '{ gsub(/^[ \t]+|[ \t]+$/, "", $3); print $3 }')
+    # Ex: REACTOR_INFO="ODL::sfc::odl-sfc-pot-netconf-renderer 072 " is broken down into
+    # NAME="ODL", PROJECT_="sfc" and NAME="odl-sfc-pot-netconf-renderer"
+    ODL=$(echo "${REACTOR_INFO}" | awk -F'::' '{ gsub(/^[ \t]+|[ \t]+[0-9]+[ \t]+$|[ \t]+$/, "", $1); print $1}')
+    PROJECT_=$(echo "${REACTOR_INFO}" | awk -F'::' '{ gsub(/^[ \t]+|[ \t]+[0-9]+[ \t]+$|[ \t]+$/, "", $2); print $2}')
+    NAME=$(echo "${REACTOR_INFO}" | awk -F'::' '{ gsub(/^[ \t]+|[ \t]+[0-9]+[ \t]+$|[ \t]+$/, "", $3); print $3}')
 else
     # set project from partial format
     ODL=""
@@ -81,11 +83,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