X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2F3rd_party_ci%2Finstall-netvirt.sh;h=232d60e5c1c2df954571befd4be7d0bae09fbd45;hb=952e1aa2640897be5088d957855ca42238f9909c;hp=c9aa4c501126291f7e791c781de4b122ba465e05;hpb=f0d232de42ae7f27d81cf7298e2b86b0f4f28726;p=releng.git diff --git a/jjb/3rd_party_ci/install-netvirt.sh b/jjb/3rd_party_ci/install-netvirt.sh index c9aa4c501..232d60e5c 100755 --- a/jjb/3rd_party_ci/install-netvirt.sh +++ b/jjb/3rd_party_ci/install-netvirt.sh @@ -1,22 +1,24 @@ #!/bin/bash -set -e - -if [ -z ${WORKSPACE} ]; then - 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 +SNAP_CACHE=$HOME/snap_cache/$OS_VERSION/$TOPOLOGY # 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" +if [ ! -f "/tmp/${NETVIRT_ARTIFACT}" ]; then + echo "ERROR: /tmp/${NETVIRT_ARTIFACT} specified as NetVirt Artifact, but file does not exist" + exit 1 +fi + +if [ ! -f "${SNAP_CACHE}/node.yaml" ]; then + echo "ERROR: node.yaml pod config missing in ${SNAP_CACHE}" + exit 1 +fi + +if [ ! -f "${SNAP_CACHE}/id_rsa" ]; then + echo "ERROR: id_rsa ssh creds missing in ${SNAP_CACHE}" exit 1 fi @@ -24,6 +26,7 @@ fi # 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 +git fetch https://gerrit.opnfv.org/gerrit/sdnvpn refs/changes/17/59017/5 && git checkout FETCH_HEAD ./odl_reinstaller.sh --pod-config ${SNAP_CACHE}/node.yaml \ - --odl-artifact ${NETVIRT_ARTIFACT} --ssh-key-file ${SNAP_CACHE}/id_rsa + --odl-artifact /tmp/${NETVIRT_ARTIFACT} --ssh-key-file ${SNAP_CACHE}/id_rsa popd > /dev/null