From 165f3f328e137dd236986c7f7807bca1a7396182 Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Wed, 2 Oct 2019 08:14:38 +0200 Subject: [PATCH] Avoid venv activate failure Change-Id: I361b74d05eea051e75757571cb3ce891cc957f61 --- jjb/nolabs/delete-booking.sh | 2 ++ jjb/nolabs/handle-booking.sh | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/jjb/nolabs/delete-booking.sh b/jjb/nolabs/delete-booking.sh index 32626dc0..9a805072 100644 --- a/jjb/nolabs/delete-booking.sh +++ b/jjb/nolabs/delete-booking.sh @@ -10,7 +10,9 @@ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) sudo apt install -y virtualenv jq > /dev/null /bin/rm -rf $NOLABS_VENV && mkdir -p $NOLABS_VENV virtualenv -p python3 $NOLABS_VENV > /dev/null +set +u source $NOLABS_VENV/bin/activate > /dev/null +set -u pip install httpie python-openstackclient python-heatclient python-novaclient > /dev/null source /tmp/openrc diff --git a/jjb/nolabs/handle-booking.sh b/jjb/nolabs/handle-booking.sh index 30f82d5f..a9fa8924 100644 --- a/jjb/nolabs/handle-booking.sh +++ b/jjb/nolabs/handle-booking.sh @@ -10,7 +10,9 @@ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) sudo apt install -y virtualenv jq > /dev/null /bin/rm -rf $NOLABS_VENV && mkdir -p $NOLABS_VENV virtualenv -p python3 $NOLABS_VENV > /dev/null +set +u source $NOLABS_VENV/bin/activate > /dev/null +set -u pip install httpie > /dev/null # check if the booking is cancelled or not @@ -37,7 +39,9 @@ echo "-------------------------------------------------" cat $NOLABS_USER_SSHPUBKEY echo "-------------------------------------------------" +set +u deactivate +set -u # get the specific patch cd $WORKSPACE git fetch "https://gerrit.nordix.org/infra/engine" $GERRIT_REFSPEC && git checkout FETCH_HEAD @@ -49,7 +53,9 @@ cd engine cd $WORKSPACE +set +u source $NOLABS_VENV/bin/activate > /dev/null +set -u ENGINE_VERSION=$(git rev-parse HEAD) cd $WORKSPACE/.cache/repos/swconfig SCENARIO_VERSION=$(git rev-parse HEAD) -- 2.25.1