Disable blocking on buildable queue (Functest)
[releng.git] / jjb / 3rd_party_ci / install-netvirt.sh
1 #!/bin/bash
2 set -o errexit
3 set -o nounset
4 set -o pipefail
5
6 SNAP_CACHE=$HOME/snap_cache/$OS_VERSION/$TOPOLOGY
7 # clone opnfv sdnvpn repo
8 git clone https://gerrit.opnfv.org/gerrit/p/sdnvpn.git $WORKSPACE/sdnvpn
9
10 if [ ! -f "/tmp/${NETVIRT_ARTIFACT}" ]; then
11   echo "ERROR: /tmp/${NETVIRT_ARTIFACT} specified as NetVirt Artifact, but file does not exist"
12   exit 1
13 fi
14
15 if [ ! -f "${SNAP_CACHE}/node.yaml" ]; then
16   echo "ERROR: node.yaml pod config missing in ${SNAP_CACHE}"
17   exit 1
18 fi
19
20 if [ ! -f "${SNAP_CACHE}/id_rsa" ]; then
21   echo "ERROR: id_rsa ssh creds missing in ${SNAP_CACHE}"
22   exit 1
23 fi
24
25 # TODO (trozet) snapshot should have already been unpacked into cache folder
26 # but we really should check the cache here, and not use a single cache folder
27 # for when we support multiple jobs on a single slave
28 pushd sdnvpn/odl-pipeline/lib > /dev/null
29 git fetch https://gerrit.opnfv.org/gerrit/sdnvpn refs/changes/17/59017/5 && git checkout FETCH_HEAD
30 ./odl_reinstaller.sh --pod-config ${SNAP_CACHE}/node.yaml \
31   --odl-artifact /tmp/${NETVIRT_ARTIFACT} --ssh-key-file ${SNAP_CACHE}/id_rsa
32 popd > /dev/null