summaryrefslogtreecommitdiff
path: root/tsp
diff options
context:
space:
mode:
authorAleksander Mistewicz <a.mistewicz@samsung.com>2017-11-02 11:53:43 (GMT)
committerAleksander Mistewicz <a.mistewicz@samsung.com>2017-11-09 13:46:45 (GMT)
commit2dcb2f6d3d7a91d055c7b8a0d6576817970e1515 (patch)
tree0d95fe754df86493ea29c2b92f725b9198f36e55 /tsp
parent63e1394ad4fc735ab4e4f43db6d0f9b00903a30b (diff)
downloadmajor-2dcb2f6d3d7a91d055c7b8a0d6576817970e1515.zip
major-2dcb2f6d3d7a91d055c7b8a0d6576817970e1515.tar.gz
major-2dcb2f6d3d7a91d055c7b8a0d6576817970e1515.tar.bz2
Add symlinks by sr/targetrefs/changes/45/181845/1
Move terminal state actions to the end of script. Change-Id: Ic5159f29fa36f70584533943c6a04830d4711dba
Diffstat (limited to 'tsp')
-rwxr-xr-xtsp/jobs/publish.sh29
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"