Remove user venv from sandbox cleanup script 17/62417/3
authorTim Johnson <tijohnson@linuxfoundation.org>
Wed, 27 Nov 2019 16:37:38 +0000 (08:37 -0800)
committerTim Johnson <tijohnson@linuxfoundation.org>
Wed, 27 Nov 2019 17:51:39 +0000 (09:51 -0800)
No longer use jjb-install.sh & jjb-cleanup.sh

Issue: RELENG-2565
Change-Id: I08e0bab6fe31a48d933c8375b75f4c9264df7a08
Signed-off-by: Tim Johnson <tijohnson@linuxfoundation.org>
jjb/lf-ci-jobs.yaml
releasenotes/notes/stop-using-user-venvs-07a69489fdb6b4f0.yaml [new file with mode: 0644]
shell/jenkins-sandbox-cleanup.sh

index 3ec2b49..1d99d69 100644 (file)
     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 (file)
index 0000000..933b31e
--- /dev/null
@@ -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.
index e97dbe4..3cdda27 100644 (file)
 # 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