diff options
-rwxr-xr-x | tsp/jobs/publish.sh | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/tsp/jobs/publish.sh b/tsp/jobs/publish.sh index 96ed6fa..c0e33c8 100755 --- a/tsp/jobs/publish.sh +++ b/tsp/jobs/publish.sh @@ -195,10 +195,28 @@ echo "OVERALL_TAG: $OVERALL_TAG" 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 ;; @@ -207,14 +225,3 @@ case "$TAG" in ;; 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" |