Merge "Set default PULL_PULL_SHA to branch name for periodic BMO e2e tests"
[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   sudo mkdir -p /usr/local/lib/docker/cli-plugins
22   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
23   sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
24 fi
25
26 unset WORKSPACE
27
28 git config --global user.email "infra@nordix.org"
29 git config --global user.name "nordix"
30
31 for csit_test in  $(echo "$CSIT_TEST_NAMES" | tr " " "\n")
32 do
33   ./run-project-csit.sh "$csit_test"
34   # remove any side effects of the runs
35   git stash
36 done