summaryrefslogtreecommitdiffstats
path: root/jjb/daisy4nfv/daisy4nfv-virtual-deploy.sh
blob: ef4a07b8d2b55b2cb8c14892cbf42c86c1ed6aca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash

echo "--------------------------------------------------------"
echo "This is diasy4nfv virtual deploy job!"
echo "--------------------------------------------------------"

cd $WORKSPACE

if [[ "$NODE_NAME" =~ "-virtual" ]]; then
    export NETWORK_CONF=./deploy/config/vm_environment/$NODE_NAME/network.yml
    export DHA_CONF=./deploy/config/vm_environment/$NODE_NAME/deploy.yml
else
    # TODO: For the time being, we need to pass this script to let contributors merge their work.
    echo "No support for non-virtual node"
    exit 0
fi

sudo ./ci/deploy/deploy.sh -d ${DHA_CONF} -n ${NETWORK_CONF} -p ${NODE_NAME:-"zte-virtual1"}

if [ $? -ne 0 ]; then
    echo "depolyment failed!"
    deploy_ret=1
fi

echo
echo "--------------------------------------------------------"
echo "Done!"

exit $deploy_ret