armclang-ubl.sh: Add retry logic with exponential backoff
Given that we get regular and apparently non-deterministic HTTP 500 error
codes with TF-M builds (somehow doesn't seem to happen with TF-A builds
though).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: I6ec3deff2572a6e9a8617c8110201464cb21e7a8
diff --git a/jenkins/armclang-ubl.sh b/jenkins/armclang-ubl.sh
index cff98f9..e87759a 100755
--- a/jenkins/armclang-ubl.sh
+++ b/jenkins/armclang-ubl.sh
@@ -12,7 +12,18 @@
varname=${COMPILER}_PATH
eval COMP_PATH=\$$varname
-if ! ${COMP_PATH}/armlm activate --code ${ARMCLANG_UBL_CODE}; then
+success=0
+delay=5
+for i in $(seq 1 3); do
+ if ${COMP_PATH}/armlm activate --code ${ARMCLANG_UBL_CODE}; then
+ success=1
+ break
+ fi
+ sleep ${delay}
+ delay=$((${delay} * 2))
+done
+
+if [ ${success} -eq 0 ]; then
ls -l ~/.armlm/logs/*.log
cat ~/.armlm/logs/*.log
exit 1