From: Tim Johnson Date: Wed, 27 Nov 2019 16:37:38 +0000 (-0800) Subject: Remove user venv from sandbox cleanup script X-Git-Tag: v0.49.0~19 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F17%2F62417%2F3;p=releng%2Fglobal-jjb.git Remove user venv from sandbox cleanup script No longer use jjb-install.sh & jjb-cleanup.sh Issue: RELENG-2565 Change-Id: I08e0bab6fe31a48d933c8375b75f4c9264df7a08 Signed-off-by: Tim Johnson --- diff --git a/jjb/lf-ci-jobs.yaml b/jjb/lf-ci-jobs.yaml index 3ec2b499..1d99d690 100644 --- a/jjb/lf-ci-jobs.yaml +++ b/jjb/lf-ci-jobs.yaml @@ -565,9 +565,7 @@ builders: - lf-infra-jjbini - shell: !include-raw-escape: - - ../shell/jjb-install.sh - ../shell/jenkins-sandbox-cleanup.sh - - ../shell/jjb-cleanup.sh - job-template: name: "{project-name}-jenkins-sandbox-cleanup" diff --git a/releasenotes/notes/stop-using-user-venvs-07a69489fdb6b4f0.yaml b/releasenotes/notes/stop-using-user-venvs-07a69489fdb6b4f0.yaml new file mode 100644 index 00000000..933b31e5 --- /dev/null +++ b/releasenotes/notes/stop-using-user-venvs-07a69489fdb6b4f0.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Removed dependency on 'user' venv created by python-tools-install.sh from + the sandbox cleanup job. It will call lf-acitivate-venv() instead. Removed + references to jjb-install.sh & jjb-cleanup.sh. diff --git a/shell/jenkins-sandbox-cleanup.sh b/shell/jenkins-sandbox-cleanup.sh index e97dbe4c..3cdda27a 100644 --- a/shell/jenkins-sandbox-cleanup.sh +++ b/shell/jenkins-sandbox-cleanup.sh @@ -11,12 +11,17 @@ # Deletes all jobs on a Jenkins Sandbox system. echo "---> jenkins-sandbox-cleanup.sh" -set -eux -o pipefail +set -euf -o pipefail -bash -c "/usr/bin/yes 2>/dev/null || true" | jenkins-jobs -s sandbox delete-all +# shellcheck disable=SC1090 +source ~/lf-env.sh + +lf-activate-venv jenkins-job-builder + +yes | jenkins-jobs -s sandbox delete-all # Recreate the All default view. -cat << EOF > all-view.yaml +cat << 'EOF' > all-view.yaml - view: name: All view-type: all