X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fjenkins-sandbox-cleanup.sh;h=dc69e2b7ad9eab184eda277d0f250e78d3b9915b;hb=04853ec1c27444d494afae28e8c181b711280f4b;hp=3cdda27abe01151a87d79adff8d145dfe6c1e6a3;hpb=f13d7760a7d4f99368359d89f75d8188063b8a36;p=releng%2Fglobal-jjb.git diff --git a/shell/jenkins-sandbox-cleanup.sh b/shell/jenkins-sandbox-cleanup.sh index 3cdda27a..dc69e2b7 100644 --- a/shell/jenkins-sandbox-cleanup.sh +++ b/shell/jenkins-sandbox-cleanup.sh @@ -14,16 +14,18 @@ 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 -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 - view: - name: All + name: all view-type: all EOF jenkins-jobs -s sandbox update -v all-view.yaml