Fix broken pipe in jenkins-sandbox-cleanup script 80/62680/3
authorTim Johnson <tijohnson@linuxfoundation.org>
Thu, 19 Dec 2019 19:13:30 +0000 (11:13 -0800)
committerTim Johnson <tijohnson@linuxfoundation.org>
Fri, 20 Dec 2019 06:16:09 +0000 (22:16 -0800)
Issue: RELENG-2640
Change-Id: I67b66146838e816b6da3e9846205ea68a7ce965c
Signed-off-by: Tim Johnson <tijohnson@linuxfoundation.org>
shell/jenkins-sandbox-cleanup.sh

index 3cdda27..90dbb68 100644 (file)
@@ -18,7 +18,8 @@ source ~/lf-env.sh
 
 lf-activate-venv jenkins-job-builder
 
-yes | jenkins-jobs -s sandbox delete-all
+# jenkins-jobs does not always open 'stdin' which may cause 'yes' to fail
+(yes || true) | jenkins-jobs -s sandbox delete-all
 
 # Recreate the All default view.
 cat << 'EOF' > all-view.yaml