2018-09-19 11:49:43 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set +e
|
|
|
|
sudo rm -fr /data/*
|
|
|
|
sudo mkdir -p /data
|
2021-01-06 08:30:54 +01:00
|
|
|
DIR="$(cd "$(dirname "$0")" && pwd)"
|
2018-09-19 11:49:43 +02:00
|
|
|
|
|
|
|
set -e
|
|
|
|
# prepare cert ...
|
|
|
|
sudo sed "s/127.0.0.1/$1/" -i tests/generateCerts.sh
|
|
|
|
sudo ./tests/generateCerts.sh
|
2019-08-09 04:50:06 +02:00
|
|
|
sudo mkdir -p /etc/docker/certs.d/$1 && sudo cp ./tests/harbor_ca.crt /etc/docker/certs.d/$1/ && rm -rf ~/.docker/ && mkdir -p ~/.docker/tls/$1:4443/ && sudo cp ./tests/harbor_ca.crt ~/.docker/tls/$1:4443/
|
2018-09-19 11:49:43 +02:00
|
|
|
|
2019-04-02 14:08:26 +02:00
|
|
|
sudo ./tests/hostcfg.sh
|
|
|
|
|
2018-09-19 11:49:43 +02:00
|
|
|
if [ "$2" = 'LDAP' ]; then
|
|
|
|
cd tests && sudo ./ldapprepare.sh && cd ..
|
|
|
|
fi
|
|
|
|
|
2021-03-04 15:29:58 +01:00
|
|
|
sudo apt-get update -y && sudo apt-get install -y python3.6
|
|
|
|
sudo rm /usr/bin/python && sudo ln -s /usr/bin/python3.6 /usr/bin/python
|
2019-01-09 10:40:27 +01:00
|
|
|
|
2018-09-19 11:49:43 +02:00
|
|
|
|
2018-12-03 10:05:06 +01:00
|
|
|
# prepare a chart file for API_DB test...
|
2021-01-06 08:30:54 +01:00
|
|
|
sudo curl -o $DIR/../../tests/apitests/python/mariadb-4.3.1.tgz https://storage.googleapis.com/harbor-builds/bin/charts/mariadb-4.3.1.tgz
|
2018-12-03 10:05:06 +01:00
|
|
|
|
2018-09-19 11:49:43 +02:00
|
|
|
sudo apt-get update && sudo apt-get install -y --no-install-recommends python-dev openjdk-7-jdk libssl-dev && sudo apt-get autoremove -y && sudo rm -rf /var/lib/apt/lists/*
|
2018-12-07 04:42:59 +01:00
|
|
|
sudo wget https://bootstrap.pypa.io/get-pip.py && sudo python ./get-pip.py && sudo pip install --ignore-installed urllib3 chardet requests && sudo pip install robotframework==3.0.4 robotframework-httplibrary requests dbbot robotframework-pabot --upgrade
|
2018-09-19 11:49:43 +02:00
|
|
|
sudo make swagger_client
|
2021-01-06 08:30:54 +01:00
|
|
|
sudo make install GOBUILDIMAGE=golang:1.15.6 COMPILETAG=compile_golangimage CLARITYIMAGE=goharbor/harbor-clarity-ui-builder:1.6.0 NOTARYFLAG=true CLAIRFLAG=true CHARTFLAG=true
|
2018-11-26 06:27:57 +01:00
|
|
|
sleep 10
|