X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fjjb-install.sh;h=baaa5d70f852287a52c909bd73935e66b0227217;hb=407b9b1a5f36d7bbdf86bc8480768878292b3349;hp=9351f489409d6cd0dc5d4a096e492bfe8a341431;hpb=0b1d0ba4945b93dc5d86fffef20f4be44fc5a2f9;p=releng%2Fglobal-jjb.git diff --git a/shell/jjb-install.sh b/shell/jjb-install.sh index 9351f489..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. @@ -14,11 +14,15 @@ echo "---> jjb-install.sh" # DO NOT set -u as virtualenv's activate script has unbound variables set -e -o pipefail -virtualenv "/tmp/v/jjb" -# shellcheck source=/tmp/v/jjb/bin/activate disable=SC1091 -source "/tmp/v/jjb/bin/activate" -pip install --quiet --upgrade "pip==9.0.3" setuptools -pip install --quiet --upgrade "jenkins-job-builder==$JJB_VERSION" +# Create a virtualenv in a temporary directoy and write it down to used +# or cleaned up later; cleanup is done in the script jjb-cleanup.sh. +JJB_VENV="$(mktemp -d)" +export JJB_VENV +virtualenv "$JJB_VENV" +echo "JJB_VENV=$JJB_VENV" > "$WORKSPACE/.jjb.properties" +# shellcheck source=$VENV_DIR/bin/activate disable=SC1091 +source "$JJB_VENV/bin/activate" +python -m pip install --quiet --upgrade "jenkins-job-builder==$JJB_VERSION" echo "----> pip freeze" pip freeze