From: Markos Chandras Date: Tue, 28 Mar 2017 14:20:46 +0000 (+0000) Subject: Merge "jjb: xci: bifrost-cleanup: Retry 'gsutil rm' on failures" X-Git-Tag: danube.1.0~53 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=8df5b9486ad80efae75dcf719acb705f9c3807b9;hp=b18f528cd8b058d2c575e48c8882771fa63a9dcf;p=releng.git Merge "jjb: xci: bifrost-cleanup: Retry 'gsutil rm' on failures" --- diff --git a/jjb/xci/bifrost-cleanup-job.yml b/jjb/xci/bifrost-cleanup-job.yml index 4e9e2a8d4..d4b2157da 100644 --- a/jjb/xci/bifrost-cleanup-job.yml +++ b/jjb/xci/bifrost-cleanup-job.yml @@ -65,9 +65,16 @@ echo "gsutil will not be executed until this is fixed!" exit 1 fi - # No force (-f). We always verify upstream jobs so if there are no logs - # something else went wrong and we need to break immediately and investigate - gsutil -m rm -r $BIFROST_GS_URL + try_to_rm=1 + while [[ $try_to_rm -lt 6 ]]; do + gsutil -m rm -r $BIFROST_GS_URL && _exitcode=$? && break + _exitcode=$? + echo "gsutil rm failed! Trying again... (attempt #$i)" + let try_to_rm += 1 + # Give it some time... + sleep 10 + done + exit $_exitcode triggers: - '{project}-gerrit-trigger-cleanup':