X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2F3rd_party_ci%2Finstall-netvirt.sh;h=ce2a50cd092f7beee94ad739429e4f9f6804e20b;hb=ac2a2c99f06ce1995c3f15be0a0dcf7153cecc39;hp=c24e8903637b45131849ec02e6f5d1130f15d64f;hpb=8578eae1f451aef3ce4f4f499f43ed924a2a0efa;p=releng.git diff --git a/jjb/3rd_party_ci/install-netvirt.sh b/jjb/3rd_party_ci/install-netvirt.sh index c24e89036..ce2a50cd0 100755 --- a/jjb/3rd_party_ci/install-netvirt.sh +++ b/jjb/3rd_party_ci/install-netvirt.sh @@ -1,4 +1,21 @@ #!/bin/bash +set -o errexit +set -o nounset +set -o pipefail -echo "Using the downloaded artifact to install netvirt" -ls -al $NETVIRT_ARTIFACT +SNAP_CACHE=$HOME/snap_cache +# clone opnfv sdnvpn repo +git clone https://gerrit.opnfv.org/gerrit/p/sdnvpn.git $WORKSPACE/sdnvpn + +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