Fix hardware_id
[ci-management.git] / jjb / scripts / csit / hc2vpp-verify-func.sh
1 #!/bin/bash
2
3 # Copyright (c) 2020 Cisco and/or its affiliates.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at:
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 # Parse optional arguments from gerrit comment trigger
17 for i in ${GERRIT_EVENT_COMMENT_TEXT}; do
18     case ${i} in
19         *honeycomb=*)
20             hc_version=`echo "${i}" | cut -d = -f2-`
21         ;;
22         *)
23         ;;
24     esac
25 done
26
27 # If HC variable is set, check honeycomb version.
28 if [[ -n "${hc_version}" ]]; then
29     if [[ "${hc_version}" == *"-release" ]]; then
30         # we are going to test release build. All release
31         # packages should be already present in release repo
32         STREAM="release"
33         echo "STREAM set to: ${STREAM}"
34     fi
35 fi
36
37 # execute csit bootstrap script if it exists
38 if [[ ! -e bootstrap-hc2vpp-integration.sh ]]
39 then
40     echo 'ERROR: No bootstrap-hc2vpp-integration.sh found'
41     exit 1
42 else
43     # make sure that bootstrap.sh is executable
44     chmod +x bootstrap-hc2vpp-integration.sh
45     # run the script
46     ./bootstrap-hc2vpp-integration.sh ${STREAM} ${OS}
47 fi
48
49 # vim: ts=4 ts=4 sts=4 et :