From f13d7760a7d4f99368359d89f75d8188063b8a36 Mon Sep 17 00:00:00 2001 From: Tim Johnson Date: Wed, 27 Nov 2019 08:37:38 -0800 Subject: [PATCH] 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 --- jjb/lf-ci-jobs.yaml | 2 -- .../notes/stop-using-user-venvs-07a69489fdb6b4f0.yaml | 6 ++++++ shell/jenkins-sandbox-cleanup.sh | 11 ++++++++--- 3 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 releasenotes/notes/stop-using-user-venvs-07a69489fdb6b4f0.yaml 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 -- 2.16.6