Merge "Add INFO.yaml verify job"
[ci-management.git] / jjb / hc2vpp / include-raw-hc2vpp-csit-verify-odl.sh
1 #!/bin/bash
2 set -xeu -o pipefail
3
4 # Figure out what system we are running on
5 if [[ -f /etc/lsb-release ]];then
6     . /etc/lsb-release
7 elif [[ -f /etc/redhat-release ]];then
8     sudo yum install -y redhat-lsb
9     DISTRIB_ID=`lsb_release -si`
10     DISTRIB_RELEASE=`lsb_release -sr`
11     DISTRIB_CODENAME=`lsb_release -sc`
12     DISTRIB_DESCRIPTION=`lsb_release -sd`
13 fi
14 echo "----- OS INFO -----"
15 echo DISTRIB_ID: ${DISTRIB_ID}
16 echo DISTRIB_RELEASE: ${DISTRIB_RELEASE}
17 echo DISTRIB_CODENAME: ${DISTRIB_CODENAME}
18 echo DISTRIB_DESCRIPTION: ${DISTRIB_DESCRIPTION}
19 DISTRIB_ID="Ubuntu"
20 if [[ "$DISTRIB_ID" != "Ubuntu" ]]; then
21     echo 'ERROR: Only Ubuntu is supported currently.'
22     exit 2
23 fi
24
25 # create HC .deb packages
26 ./packaging/deb/${DISTRIB_CODENAME}/debuild.sh
27 cp ./packaging/deb/${DISTRIB_CODENAME}/*.deb ${WORKSPACE}/csit
28
29 cd ${WORKSPACE}/csit
30 # execute csit bootstrap script if it exists
31 if [[ ! -e bootstrap-hc2vpp-verify.sh ]]
32 then
33     echo 'ERROR: No bootstrap-hc2vpp-verify.sh found'
34     exit 1
35 else
36     # make sure that bootstrap.sh is executable
37     chmod +x bootstrap-hc2vpp-verify.sh
38     # run the script
39     ./bootstrap-hc2vpp-verify-odl.sh ${OS} ${ODL}
40 fi
41
42 # vim: ts=4 ts=4 sts=4 et :