summaryrefslogtreecommitdiff
path: root/tsp/jobs
diff options
context:
space:
mode:
authorAleksander Mistewicz <a.mistewicz@samsung.com>2016-08-18 14:43:37 +0200
committerAleksander Mistewicz <a.mistewicz@samsung.com>2016-12-06 16:37:14 +0100
commit592ab89614ca46ecc4d4bb5cac919d7771682871 (patch)
treeca8087e46d767e9ac47b1ca3af42f9b347f02878 /tsp/jobs
parenta07733b4012747277a67bb6aa6ef461db5ed5084 (diff)
downloadmajor-592ab89614ca46ecc4d4bb5cac919d7771682871.tar.gz
major-592ab89614ca46ecc4d4bb5cac919d7771682871.tar.bz2
major-592ab89614ca46ecc4d4bb5cac919d7771682871.zip
Dispatch publish job before retrigger
If failure occured job was retriggered until FAIL_CNT was exceeded at the start what created jobs that only triggered publishing of failure. Raise FAIL_CNT max value to 2. Change-Id: I3772ba293f0749b8a2b1d4c436c5c36e0d68c1fb Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
Diffstat (limited to 'tsp/jobs')
-rwxr-xr-xtsp/jobs/common_prep_flash_conf.sh11
1 files changed, 5 insertions, 6 deletions
diff --git a/tsp/jobs/common_prep_flash_conf.sh b/tsp/jobs/common_prep_flash_conf.sh
index 960c75f..0c3dab0 100755
--- a/tsp/jobs/common_prep_flash_conf.sh
+++ b/tsp/jobs/common_prep_flash_conf.sh
@@ -48,17 +48,16 @@ retrigger() {
# Add job back to the queue
echo "Retrigger... ($1)"
echo "FAILED 1" > sysctl.result
+ if [ "$FAIL_CNT" -ge 3 ]; then
+ # Trigger publish job
+ tspwb -L PUBLISH sh "${TSP_DIR}/jobs/publish.sh" "$BUILD_NR" "$TARGET"
+ exit 1
+ fi
tsrun_target "${TARGET}" -L "RETRIGGERED_$(echo "$TARGET" | tr '[:lower:]' '[:upper:]')_PREPARE_FLASH_CONF" \
sh "${TSP_DIR}/jobs/common_prep_flash_conf.sh" "$BUILD_NR" "${TARGET}" "$((FAIL_CNT + 1))"
exit 0
}
-if [ "$FAIL_CNT" -ge 2 ]; then
- # Trigger publish job
- tspwb -L PUBLISH sh "${TSP_DIR}/jobs/publish.sh" "$BUILD_NR" "$TARGET"
- exit 1
-fi
-
# Create and clean required directories on remote machine (tl-runner)
ssh tl-runner "rm -rf \"${WORKDIR_REMOTE}\"; mkdir -p \"${WORKDIR_REMOTE}\"" || retrigger "ssh: remote ws cleanup failed"