Merge "Set the daily mrr jobs cadence to normal"
[ci-management.git] / docker / scripts / dbld_csit_install_packages.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 set -euxo pipefail
17
18 export CIMAN_DOCKER_SCRIPTS=${CIMAN_DOCKER_SCRIPTS:-"$(dirname $BASH_SOURCE)"}
19 . $CIMAN_DOCKER_SCRIPTS/lib_csit.sh
20 . $CIMAN_DOCKER_SCRIPTS/lib_vpp.sh
21
22 must_be_run_as_root
23 must_be_run_in_docker_build
24
25 case "$OS_NAME" in
26     ubuntu-18.04)
27         supported_os="true" ;;
28     *)
29         supported_os="" ;;
30 esac
31 if [ -z "$supported_os" ] ; then
32     echo "CSIT is not supported on $OS_NAME. Skipping CSIT package install..."
33     exit 0
34 fi
35
36 echo_log
37 echo_log "Starting  $(basename $0)"
38
39 do_git_config csit
40 for vpp_branch in ${VPP_BRANCHES[$OS_NAME]} ; do
41     # Returns checked out branch in csit_branch
42     csit_checkout_branch_for_vpp $vpp_branch
43
44     # Install csit OS packages
45     csit_install_packages $csit_branch
46
47     # Install/cache python packages
48     csit_pip_cache $csit_branch
49 done
50
51 echo_log -e "Completed $(basename $0)!\n\n=========="