mirror of
https://github.com/goharbor/harbor
synced 2025-04-21 21:44:12 +00:00
Merge pull request #15956 from YangJiao0817/refactor-ci-script
Modify ci script
This commit is contained in:
commit
cfbbc82219
@ -55,11 +55,6 @@ then
|
|||||||
sed "s/# github_token: xxx/github_token: $GITHUB_TOKEN/" -i make/harbor.yml
|
sed "s/# github_token: xxx/github_token: $GITHUB_TOKEN/" -i make/harbor.yml
|
||||||
fi
|
fi
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
sudo make compile build prepare COMPILETAG=compile_golangimage GOBUILDTAGS="include_oss include_gcs" BUILDBIN=true NOTARYFLAG=true TRIVYFLAG=true CHARTFLAG=true GEN_TLS=true PULL_BASE_FROM_DOCKERHUB=false
|
sudo make compile build prepare COMPILETAG=compile_golangimage GOBUILDTAGS="include_oss include_gcs" BUILDBIN=true NOTARYFLAG=true TRIVYFLAG=true CHARTFLAG=true GEN_TLS=true PULL_BASE_FROM_DOCKERHUB=false
|
||||||
|
|
||||||
# set the debugging env
|
# set the debugging env
|
||||||
|
@ -6,17 +6,7 @@ set -x
|
|||||||
sudo gsutil version -l
|
sudo gsutil version -l
|
||||||
|
|
||||||
harbor_logs_bucket="harbor-ci-logs"
|
harbor_logs_bucket="harbor-ci-logs"
|
||||||
# GC credentials
|
|
||||||
#keyfile="/home/travis/harbor-ci-logs.key"
|
|
||||||
#botofile="/home/travis/.boto"
|
|
||||||
#echo -en $GS_PRIVATE_KEY > $keyfile
|
|
||||||
#sudo chmod 400 $keyfile
|
|
||||||
#echo "[Credentials]" >> $botofile
|
|
||||||
#echo "gs_service_key_file = $keyfile" >> $botofile
|
|
||||||
#echo "gs_service_client_id = $GS_CLIENT_EMAIL" >> $botofile
|
|
||||||
#echo "[GSUtil]" >> $botofile
|
|
||||||
#echo "content_language = en" >> $botofile
|
|
||||||
#echo "default_project_id = $GS_PROJECT_ID" >> $botofile
|
|
||||||
DIR="$(cd "$(dirname "$0")" && pwd)"
|
DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||||
E2E_IMAGE="goharbor/harbor-e2e-engine:4.1.0-api"
|
E2E_IMAGE="goharbor/harbor-e2e-engine:4.1.0-api"
|
||||||
|
|
||||||
@ -49,7 +39,8 @@ fi
|
|||||||
rc=$?
|
rc=$?
|
||||||
## --------------------------------------------- Upload Harbor CI Logs -------------------------------------------
|
## --------------------------------------------- Upload Harbor CI Logs -------------------------------------------
|
||||||
timestamp=$(date +%s)
|
timestamp=$(date +%s)
|
||||||
outfile="integration_logs_$timestamp$TRAVIS_COMMIT.tar.gz"
|
GIT_COMMIT=$(git rev-parse --short "$GITHUB_SHA")
|
||||||
|
outfile="integration_logs_$timestamp$GIT_COMMIT.tar.gz"
|
||||||
sudo tar -zcvf $outfile output.xml log.html /var/log/harbor/*
|
sudo tar -zcvf $outfile output.xml log.html /var/log/harbor/*
|
||||||
if [ -f "$outfile" ]; then
|
if [ -f "$outfile" ]; then
|
||||||
uploader $outfile $harbor_logs_bucket
|
uploader $outfile $harbor_logs_bucket
|
||||||
|
@ -3,5 +3,5 @@ set -x
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
sudo make package_online GOBUILDTAGS="include_oss include_gcs" VERSIONTAG=dev-travis PKGVERSIONTAG=dev-travis UIVERSIONTAG=dev-travis GOBUILDIMAGE=golang:1.17.2 COMPILETAG=compile_golangimage BUILDBIN=true NOTARYFLAG=true CHARTFLAG=true TRIVYFLAG=true HTTPPROXY= PULL_BASE_FROM_DOCKERHUB=false
|
sudo make package_online GOBUILDTAGS="include_oss include_gcs" VERSIONTAG=dev-gitaction PKGVERSIONTAG=dev-gitaction UIVERSIONTAG=dev-gitaction GOBUILDIMAGE=golang:1.17.2 COMPILETAG=compile_golangimage BUILDBIN=true NOTARYFLAG=true CHARTFLAG=true TRIVYFLAG=true HTTPPROXY= PULL_BASE_FROM_DOCKERHUB=false
|
||||||
sudo make package_offline GOBUILDTAGS="include_oss include_gcs" VERSIONTAG=dev-travis PKGVERSIONTAG=dev-travis UIVERSIONTAG=dev-travis GOBUILDIMAGE=golang:1.17.2 COMPILETAG=compile_golangimage BUILDBIN=true NOTARYFLAG=true CHARTFLAG=true TRIVYFLAG=true HTTPPROXY= PULL_BASE_FROM_DOCKERHUB=false
|
sudo make package_offline GOBUILDTAGS="include_oss include_gcs" VERSIONTAG=dev-gitaction PKGVERSIONTAG=dev-gitaction UIVERSIONTAG=dev-gitaction GOBUILDIMAGE=golang:1.17.2 COMPILETAG=compile_golangimage BUILDBIN=true NOTARYFLAG=true CHARTFLAG=true TRIVYFLAG=true HTTPPROXY= PULL_BASE_FROM_DOCKERHUB=false
|
||||||
|
@ -9,6 +9,11 @@ echo "internal_tls:" >> make/harbor.yml
|
|||||||
echo " enabled: true" >> make/harbor.yml
|
echo " enabled: true" >> make/harbor.yml
|
||||||
echo " dir: /etc/harbor/tls/internal" >> make/harbor.yml
|
echo " dir: /etc/harbor/tls/internal" >> make/harbor.yml
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
# TODO: remove it when scanner adapter support internal access of harbor
|
# TODO: remove it when scanner adapter support internal access of harbor
|
||||||
echo "storage_service:" >> make/harbor.yml
|
echo "storage_service:" >> make/harbor.yml
|
||||||
echo " ca_bundle: /data/cert/server.crt" >> make/harbor.yml
|
echo " ca_bundle: /data/cert/server.crt" >> make/harbor.yml
|
||||||
|
Loading…
x
Reference in New Issue
Block a user