echo "TARGET: $TARGET"
echo "PROFILE: $PROFILE"
+# Publish to database
+update_db "$SR" "$OVERALL_TAG" "$BUILD_NR" "$TARGET"
+
+# Remove all queued WWW jobs
+for i in $(tsresults | grep "queued.*WWW" | grep -o "^[0-9]*")
+do
+ tsresults -r "$i"
+done
+
+# Dispatch a new one
+tsresults -L WWW sh "${TSP_DIR}/jobs/update_www.sh"
+
+# Check if TAG is one of terminal states
case "$TAG" in
*Fail*|*Unclear*|*OK*)
if [ -x "${TSP_DIR}/scripts/publish_hook.sh" ]
then
+ # Link to results by SR/target
+ SRDIR="${WS_PUBLISH}/sr/$SR"
+ mkdir -p "${SRDIR}"
+ ln -sf "${IMG_WORKDIR}" "${SRDIR}/${TARGET}"
+ # Trigger the hook
. "${TSP_DIR}/scripts/publish_hook.sh"
fi
;;
;;
esac
-# Publish to database
-update_db "$SR" "$OVERALL_TAG" "$BUILD_NR" "$TARGET"
-
-# Remove all queued WWW jobs
-for i in $(tsresults | grep "queued.*WWW" | grep -o "^[0-9]*")
-do
- tsresults -r "$i"
-done
-
-# Dispatch a new one
-tsresults -L WWW sh "${TSP_DIR}/jobs/update_www.sh"