From 3d5a03519704bf135343d75790ffb714b790e87f Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 15 Apr 2015 16:51:14 -0700 Subject: [PATCH] Fix retries in grab_console_log.sh We implemented retries of console log grabbing to workaround occasional jenkins 502 errors, but this is running under set -e so curl returning a non zero error message resulted in short circuiting the retries and failed the jobs. Fix this with a simple || true appendage to the curl command so that any failed curls can error properly without affecting the error checking in the script. We will then retry until we eventually give up. Change-Id: I0a784aa45bff7de5b411372ccecc569ec148ecc5 --- jenkins/scripts/grab_console_log.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/scripts/grab_console_log.sh b/jenkins/scripts/grab_console_log.sh index 40e59f393c..8df65c7842 100755 --- a/jenkins/scripts/grab_console_log.sh +++ b/jenkins/scripts/grab_console_log.sh @@ -28,7 +28,7 @@ while ! grep -q "$END_UUID" /tmp/console.html; do # fails. This allows us to retry when we have Jenkins proxy # errors without polluting the output document. # --insecure because our Jenkins masters use self signed SSL certs. - curl -X POST --data "start=$(stat -c %s /tmp/console.html || echo 0)" --fail --insecure $BUILD_URL$console_log_path >> /tmp/console.html + curl -X POST --data "start=$(stat -c %s /tmp/console.html || echo 0)" --fail --insecure $BUILD_URL$console_log_path >> /tmp/console.html || true done # We need to add
 tags around the output for log-osanalyze to not escape