From: Thanh Ha Date: Fri, 14 Sep 2018 00:50:22 +0000 (-0400) Subject: Update jjb jobs to use lf-infra-pre-build X-Git-Tag: v0.24.3~3 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=fa92cd4118bf1ec02ec93327fcfda2325b7c9106;p=releng%2Fglobal-jjb.git Update jjb jobs to use lf-infra-pre-build 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 --- diff --git a/jjb/lf-ci-jobs.yaml b/jjb/lf-ci-jobs.yaml index f9aff908..61f37fee 100644 --- a/jjb/lf-ci-jobs.yaml +++ b/jjb/lf-ci-jobs.yaml @@ -617,6 +617,7 @@ ##################### builders: + - lf-infra-pre-build - lf-infra-jjbini - shell: !include-raw-escape: - ../shell/jjb-install.sh @@ -725,6 +726,7 @@ concurrent: true builders: + - lf-infra-pre-build - lf-infra-jjbini - shell: !include-raw-escape: - ../shell/git-validate-jira-urls.sh diff --git a/shell/jjb-cleanup.sh b/shell/jjb-cleanup.sh index 9f3536a3..69d1534b 100644 --- a/shell/jjb-cleanup.sh +++ b/shell/jjb-cleanup.sh @@ -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 diff --git a/shell/jjb-install.sh b/shell/jjb-install.sh index 86fbef71..baaa5d70 100644 --- a/shell/jjb-install.sh +++ b/shell/jjb-install.sh @@ -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