mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 20:26:13 +01:00
0dda643bc5
Robot tests have been always executed in docker container, but API pyt-test is not, so rebuild Dockerfile for it. During that, some of tools have been upgraded, so API py-test scripts need some modification. Signed-off-by: danfengliu <danfengl@vmware.com>
38 lines
1.0 KiB
Bash
Executable File
38 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
set -x
|
|
|
|
set +e
|
|
sudo rm -fr /data/*
|
|
sudo mkdir -p /data
|
|
DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
|
|
set -e
|
|
if [ -z "$1" ]; then echo no ip specified; exit 1;fi
|
|
# prepare cert ...
|
|
sudo ./tests/generateCerts.sh $1
|
|
sudo wget https://bootstrap.pypa.io/get-pip.py && sudo python ./get-pip.py && sudo pip install --ignore-installed urllib3 chardet requests --upgrade
|
|
sudo ./tests/hostcfg.sh
|
|
|
|
if [ "$2" = 'LDAP' ]; then
|
|
cd tests && sudo ./ldapprepare.sh && cd ..
|
|
fi
|
|
|
|
if [ $GITHUB_TOKEN ];
|
|
then
|
|
sed "s/# github_token: xxx/github_token: $GITHUB_TOKEN/" -i make/harbor.yml
|
|
fi
|
|
|
|
sudo make build_base_docker compile build prepare COMPILETAG=compile_golangimage GOBUILDTAGS="include_oss include_gcs" NOTARYFLAG=true CLAIRFLAG=true TRIVYFLAG=true CHARTFLAG=true GEN_TLS=true
|
|
|
|
# set the debugging env
|
|
echo "GC_TIME_WINDOW_HOURS=0" | sudo tee -a ./make/common/config/core/env
|
|
sudo make start
|
|
|
|
# waiting 5 minutes to start
|
|
for((i=1;i<=30;i++)); do
|
|
echo $i waiting 10 seconds...
|
|
sleep 10
|
|
curl -k -L -f 127.0.0.1/api/v2.0/systeminfo && break
|
|
docker ps
|
|
done
|