From f2be25995937407748e63ee671f0573460fe82f1 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Wed, 7 Jun 2017 11:54:48 +0200 Subject: [PATCH 1/2] wait at least once for service to be down so the .exe gets released --- Installation/Windows/Plugins/WaitForService.nsh | 1 + 1 file changed, 1 insertion(+) diff --git a/Installation/Windows/Plugins/WaitForService.nsh b/Installation/Windows/Plugins/WaitForService.nsh index 5be5c9a84c..e4963ca3e8 100644 --- a/Installation/Windows/Plugins/WaitForService.nsh +++ b/Installation/Windows/Plugins/WaitForService.nsh @@ -59,6 +59,7 @@ Function ${un}WaitForServiceDown ${EndIf} IntOp $R0 $R0 + 1 Goto try_again + Sleep 1000 FunctionEnd !macroend From cf53ee86db0082f539714e2febd676b0d08cf56f Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Wed, 7 Jun 2017 12:04:37 +0200 Subject: [PATCH 2/2] fix retry --- Installation/Jenkins/build.sh | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/Installation/Jenkins/build.sh b/Installation/Jenkins/build.sh index 5da99eb5d4..b61a479dd0 100755 --- a/Installation/Jenkins/build.sh +++ b/Installation/Jenkins/build.sh @@ -706,18 +706,22 @@ set -e if [ -n "${CPACK}" ] && [ -n "${TARGET_DIR}" ]; then ${PACKAGE_MAKE} clean_packages || exit 1 -# while test "${RETRY_N_TIMES}" -gt 0; do - ${PACKAGE_MAKE} packages - echo "Package built status: $?" - #&& break - #RETRY_N_TIMES=$((RETRY_N_TIMES - 1)) - #echo "failed to build packages - waiting 5 mins maybe the situation gets better?" - #sleep 600 - #done - #if test "${RETRY_N_TIMES}" -eq 0; then - #echo "building packages failed terminally" - #exit 1 - #fi + + set +e + WAIT_ON_FAIL=$((RETRY_N_TIMES - 1)) + while test "${RETRY_N_TIMES}" -gt 0; do + ${PACKAGE_MAKE} packages && break + RETRY_N_TIMES=$((RETRY_N_TIMES - 1)) + if test "${WAIT_ON_FAIL}" -gt 0; then + echo "failed to build packages - waiting 5 mins maybe the situation gets better?" + sleep 600 + fi + done + if test "${RETRY_N_TIMES}" -eq 0; then + echo "building packages failed terminally" + exit 1 + fi + set -e fi # and install