Fix: Pin urllib3 to <2.0.0 for the JJB cleanup
[releng/global-jjb.git] / shell / jenkins-sandbox-cleanup.sh
index 3cdda27..5197024 100644 (file)
@@ -14,11 +14,13 @@ echo "---> jenkins-sandbox-cleanup.sh"
 set -euf -o pipefail
 
 # shellcheck disable=SC1090
-source ~/lf-env.sh
+. ~/lf-env.sh
 
-lf-activate-venv jenkins-job-builder
+lf-activate-venv --python python3 --venv-file /tmp/.jjb_venv \
+    jenkins-job-builder urllib3~=1.26.15
 
-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