Python2/3 problem in jjb-deploy job 88/62788/10
authorTim Johnson <tijohnson@linuxfoundation.org>
Mon, 13 Jan 2020 21:21:18 +0000 (13:21 -0800)
committerTim Johnson <tijohnson@linuxfoundation.org>
Tue, 21 Jan 2020 15:26:36 +0000 (07:26 -0800)
Removed ref of macro: lf-pip-install from macro: lf_jjb_deploy_job. A
call to lf-activate-venv() has beed added to jjb-deploy-job.sh to
install jenkins-jobs command. The pip-install.sh is no longer needed.

ISSUE: IT-18720
Change-Id: Ice1e9793f131eace41a3df9bbbe598aac071c1df
Signed-off-by: Tim Johnson <tijohnson@linuxfoundation.org>
jjb/lf-ci-jobs.yaml
jjb/lf-macros.yaml
releasenotes/notes/update-jjb-deploy-job-0802fb0d7e47726d.yaml [new file with mode: 0644]
shell/jjb-deploy-job.sh

index 701898c..59045b6 100644 (file)
           jenkins-ssh-credential: "{jenkins-ssh-credential}"
 
     builders:
-      - lf-pip-install:
-          pip-packages: jenkins-job-builder
       - lf-infra-jjbini
       - shell: !include-raw-escape: ../shell/jjb-deploy-job.sh
 
index 6d192bf..8961184 100644 (file)
             - file-id: "{settings-file}"
               variable: "SETTINGS_FILE"
 
-- builder:
-    name: lf-pip-install
-    builders:
-      - inject:
-          properties-content: PIP_PACKAGES={pip-packages}
-      - shell: !include-raw-escape: ../shell/pip-install.sh
-
 - builder:
     name: lf-provide-maven-settings-cleanup
     builders:
diff --git a/releasenotes/notes/update-jjb-deploy-job-0802fb0d7e47726d.yaml b/releasenotes/notes/update-jjb-deploy-job-0802fb0d7e47726d.yaml
new file mode 100644 (file)
index 0000000..c3a05e8
--- /dev/null
@@ -0,0 +1,11 @@
+---
+fixes:
+  - |
+    The jjb-deploy-job.sh was 'activating' a venv that was created by
+    pip-install.sh in /tmp/v. This venv was based on python2. Now
+    jjb-deploy-job.sh calls lf-activate-venv() to install jenkins-jobs in a
+    venv based on python3.
+upgrade:
+  - |
+    The lf-pip-install builder macro has been deleted. At some point we will
+    also be deleting shell/pip-install.sh.
index 5efb9f4..152a02e 100644 (file)
 echo "---> jjb-deploy-job.sh"
 
 # Ensure we fail the job if any steps fail.
-set -e -o pipefail
+set -uef -o pipefail
 
-# shellcheck source=/tmp/v/jenkins-job-builder/bin/activate disable=SC1091
-source "/tmp/v/jenkins-job-builder/bin/activate"
+# shellcheck disable=SC1090
+source ~/lf-env.sh
+
+# Version controlled by JJB_VERSION
+lf-activate-venv jenkins-job-builder
 
 # Fetch patch if gerrit project matches the jjb-deploy project
 if [ "${GERRIT_PROJECT}" == "${PROJECT}" ]; then