summaryrefslogtreecommitdiffstats
path: root/jjb/3rd_party_ci/install-netvirt.sh
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2017-02-02 14:23:40 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-02-02 14:23:40 +0000
commitf6fb85d278ada5d2a407c49a7f4c5de9c81b8d67 (patch)
treecb6148105cd45230a134c0526976e38ae579dfd8 /jjb/3rd_party_ci/install-netvirt.sh
parentd406fb03948296cdd02c7b93ffb9433ceb39d872 (diff)
parent2590b3c452a5b8e6bd95dbd3f6daecc12a9fc20d (diff)
Merge "Apex: Create promotion and verify job for Apex CSIT snapshots"
Diffstat (limited to 'jjb/3rd_party_ci/install-netvirt.sh')
-rwxr-xr-xjjb/3rd_party_ci/install-netvirt.sh24
1 files changed, 19 insertions, 5 deletions
diff --git a/jjb/3rd_party_ci/install-netvirt.sh b/jjb/3rd_party_ci/install-netvirt.sh
index f111d4847..c9aa4c501 100755
--- a/jjb/3rd_party_ci/install-netvirt.sh
+++ b/jjb/3rd_party_ci/install-netvirt.sh
@@ -2,14 +2,28 @@
set -e
if [ -z ${WORKSPACE} ]; then
- echo "WORKSPACE is unset. Please do so."
+ echo "WORKSPACE is unset. Please set."
exit 1
fi
# wipe the WORKSPACE
/bin/rm -rf $WORKSPACE/*
+set -o errexit
+set -o nounset
+set -o pipefail
+
+SNAP_CACHE=$HOME/snap_cache
# clone opnfv sdnvpn repo
git clone https://gerrit.opnfv.org/gerrit/p/sdnvpn.git $WORKSPACE/sdnvpn
-. $WORKSPACE/sdnvpn/odl-pipeline/odl-pipeline-common.sh
-pushd $LIB
-./odl_reinstaller.sh --cloner-info $CLONER_INFO --odl-artifact $NETVIRT_ARTIFACT
-popd \ No newline at end of file
+
+if [ ! -f "$NETVIRT_ARTIFACT" ]; then
+ echo "ERROR: ${NETVIRT_ARTIFACT} specified as NetVirt Artifact, but file does not exist"
+ exit 1
+fi
+
+# TODO (trozet) snapshot should have already been unpacked into cache folder
+# but we really should check the cache here, and not use a single cache folder
+# for when we support multiple jobs on a single slave
+pushd sdnvpn/odl-pipeline/lib > /dev/null
+./odl_reinstaller.sh --pod-config ${SNAP_CACHE}/node.yaml \
+ --odl-artifact ${NETVIRT_ARTIFACT} --ssh-key-file ${SNAP_CACHE}/id_rsa
+popd > /dev/null