DO NOT fail build when no failed artifacts found 27/70627/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Sun, 8 Apr 2018 15:42:24 +0000 (11:42 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Sun, 8 Apr 2018 15:42:48 +0000 (11:42 -0400)
Handle the case where the build was successful so no failed artifacts
were determined. DO NOT cause the build to return as UNSTABLE.

Change-Id: I1eabdb014b8952040efb329fa61d5575fb585bcf
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jjb/autorelease/notify-build-failure.sh

index 0e3fe29b4f3fed4d86795a2716cbe4bea83cae62..939c46b5ef06883c1f7fbf1663510f31e91af62d 100644 (file)
@@ -81,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