uplift k8s to v1.31.2
[infra/cicd.git] / jjb / onap / policy-docker-csit-jobs.sh
1 #!/bin/bash
2 set -o errexit
3 set -o nounset
4 set -o pipefail
5
6 cd $WORKSPACE
7
8 cd $WORKSPACE/csit
9 echo "----------------------------------------------------"
10 echo "Ensure Pip is usable"
11 echo "----------------------------------------------------"
12 sudo apt-get install -y python3-venv
13 sudo apt-get install -y python3-dev gcc
14
15 echo "----------------------------------------------------"
16 echo "Install Docker Compose if needed"
17 echo "----------------------------------------------------"
18 if [ -f /usr/local/lib/docker/cli-plugins/docker-compose ]; then
19   echo "Docker compose already installed"
20 else
21   echo "Installing Docker Compose"
22   sudo mkdir -p /usr/local/lib/docker/cli-plugins
23   sudo curl -SL https://github.com/docker/compose/releases/download/v2.27.0/docker-compose-linux-x86_64 -o /usr/local/lib/docker/cli-plugins/docker-compose
24   sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
25 fi
26
27 unset WORKSPACE
28
29 git config --global user.email "infra@nordix.org"
30 git config --global user.name "nordix"
31
32 for csit_test in  $(echo "$CSIT_TEST_NAMES" | tr " " "\n")
33 do
34   ./run-project-csit.sh "$csit_test"
35   # remove any side effects of the runs
36   git stash
37 done