Update jjb jobs to use lf-infra-pre-build 94/12594/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 14 Sep 2018 00:50:22 +0000 (20:50 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 14 Sep 2018 00:50:25 +0000 (20:50 -0400)
Use lf-infra-pre-build to install lftools via --user config. This
resolves the post-build install failing to pull in pip==18.0.
This is related to the lftools-venv series of patches.

Change-Id: Iade69e1de3bc585c88d1c4fe60a7081c9d6319aa
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jjb/lf-ci-jobs.yaml
shell/jjb-cleanup.sh
shell/jjb-install.sh

index f9aff90..61f37fe 100644 (file)
     #####################
 
     builders:
+      - lf-infra-pre-build
       - lf-infra-jjbini
       - shell: !include-raw-escape:
           - ../shell/jjb-install.sh
     concurrent: true
 
     builders:
+      - lf-infra-pre-build
       - lf-infra-jjbini
       - shell: !include-raw-escape:
           - ../shell/git-validate-jira-urls.sh
index 9f3536a..69d1534 100644 (file)
@@ -20,7 +20,8 @@ set -e -o pipefail
 # shellcheck source="$WORKSPACE/.jjb.properties" disable=SC1091
 source "$WORKSPACE/.jjb.properties"
 if [[ -n "$JJB_VENV" && "$JJB_VENV" =~ /tmp/.* ]]; then
-    rm -r "$JJB_VENV" && echo "$JJB_VENV removed"
+    rm -rf "$JJB_VENV" && echo "$JJB_VENV removed"
     unset JJB_VENV
 fi
-rm "$WORKSPACE/.jjb.properties"
+rm -f "$WORKSPACE/.jjb.properties"
+deactivate
index 86fbef7..baaa5d7 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -l
 # SPDX-License-Identifier: EPL-1.0
 ##############################################################################
 # Copyright (c) 2017 The Linux Foundation and others.
@@ -22,8 +22,7 @@ virtualenv "$JJB_VENV"
 echo "JJB_VENV=$JJB_VENV" > "$WORKSPACE/.jjb.properties"
 # shellcheck source=$VENV_DIR/bin/activate disable=SC1091
 source "$JJB_VENV/bin/activate"
-pip install --quiet --upgrade "pip==9.0.3" setuptools
-pip install --quiet --upgrade "jenkins-job-builder==$JJB_VERSION"
+python -m pip install --quiet --upgrade "jenkins-job-builder==$JJB_VERSION"
 
 echo "----> pip freeze"
 pip freeze