2018-09-19 11:49:43 +02:00
|
|
|
#!/bin/bash
|
2019-11-28 12:57:49 +01:00
|
|
|
set -x
|
2018-09-19 11:49:43 +02:00
|
|
|
|
|
|
|
set +e
|
|
|
|
sudo rm -fr /data/*
|
|
|
|
sudo mkdir -p /data
|
2019-12-11 12:11:20 +01:00
|
|
|
DIR="$(cd "$(dirname "$0")" && pwd)"
|
2018-09-19 11:49:43 +02:00
|
|
|
|
|
|
|
set -e
|
2019-11-28 12:57:49 +01:00
|
|
|
if [ -z "$1" ]; then echo no ip specified; exit 1;fi
|
2018-09-19 11:49:43 +02:00
|
|
|
# prepare cert ...
|
2019-11-28 12:57:49 +01:00
|
|
|
sudo ./tests/generateCerts.sh $1
|
2021-01-26 10:03:34 +01:00
|
|
|
|
|
|
|
python --version
|
|
|
|
pip -V
|
|
|
|
cat /etc/issue
|
|
|
|
cat /proc/version
|
|
|
|
sudo apt-get update -y && sudo apt-get install -y zbar-tools libzbar-dev python-zbar python3.7
|
|
|
|
sudo rm /usr/bin/python && sudo ln -s /usr/bin/python3.7 /usr/bin/python
|
|
|
|
sudo apt-get install -y python3-pip
|
|
|
|
pip -V
|
|
|
|
sudo -H pip install --ignore-installed urllib3 chardet requests --upgrade
|
|
|
|
python --version
|
|
|
|
|
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
|
|
|
|
|
2020-03-10 07:55:55 +01:00
|
|
|
if [ $GITHUB_TOKEN ];
|
|
|
|
then
|
|
|
|
sed "s/# github_token: xxx/github_token: $GITHUB_TOKEN/" -i make/harbor.yml
|
|
|
|
fi
|
2020-09-01 12:48:56 +02:00
|
|
|
|
2021-01-07 11:34:01 +01:00
|
|
|
sed "s|# metric:|metric:|" -i make/harbor.yml
|
|
|
|
sed "s|# enabled: false| enabled: true|" -i make/harbor.yml
|
|
|
|
sed "s|# port: 9090| port: 9090|" -i make/harbor.yml
|
|
|
|
sed "s|# path: /metrics| path: /metrics|" -i make/harbor.yml
|
|
|
|
|
2021-01-22 04:33:42 +01:00
|
|
|
sudo make build_base_docker compile build prepare COMPILETAG=compile_golangimage GOBUILDTAGS="include_oss include_gcs" BUILDBIN=true NOTARYFLAG=true TRIVYFLAG=true CHARTFLAG=true GEN_TLS=true
|
2020-07-22 05:09:01 +02:00
|
|
|
|
|
|
|
# set the debugging env
|
|
|
|
echo "GC_TIME_WINDOW_HOURS=0" | sudo tee -a ./make/common/config/core/env
|
|
|
|
sudo make start
|
2020-04-20 10:00:08 +02:00
|
|
|
|
|
|
|
# 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
|
2020-06-15 18:20:18 +02:00
|
|
|
docker ps
|
2020-05-22 06:06:25 +02:00
|
|
|
done
|