diff --git a/tests/ci/api_common_install.sh b/tests/ci/api_common_install.sh index 111febae2..b4a844869 100755 --- a/tests/ci/api_common_install.sh +++ b/tests/ci/api_common_install.sh @@ -55,11 +55,6 @@ then sed "s/# github_token: xxx/github_token: $GITHUB_TOKEN/" -i make/harbor.yml 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 # set the debugging env diff --git a/tests/ci/api_run.sh b/tests/ci/api_run.sh index 8180317ee..7ef7fce8f 100755 --- a/tests/ci/api_run.sh +++ b/tests/ci/api_run.sh @@ -6,17 +6,7 @@ set -x sudo gsutil version -l 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)" E2E_IMAGE="goharbor/harbor-e2e-engine:4.1.0-api" @@ -49,7 +39,8 @@ fi rc=$? ## --------------------------------------------- Upload Harbor CI Logs ------------------------------------------- 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/* if [ -f "$outfile" ]; then uploader $outfile $harbor_logs_bucket diff --git a/tests/ci/distro_installer.sh b/tests/ci/distro_installer.sh index 0b3cd9921..8492ffeb6 100755 --- a/tests/ci/distro_installer.sh +++ b/tests/ci/distro_installer.sh @@ -3,5 +3,5 @@ set -x 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_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_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-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 diff --git a/tests/hostcfg.sh b/tests/hostcfg.sh index 22ccacaf1..d32624161 100755 --- a/tests/hostcfg.sh +++ b/tests/hostcfg.sh @@ -9,6 +9,11 @@ echo "internal_tls:" >> make/harbor.yml echo " enabled: true" >> 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 echo "storage_service:" >> make/harbor.yml echo " ca_bundle: /data/cert/server.crt" >> make/harbor.yml