mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 18:25:56 +01:00
fix the uri of latest build file.
This commit is contained in:
parent
fc49245188
commit
24a80ea324
@ -59,10 +59,6 @@ if [[ $DRONE_BRANCH == "master" || $DRONE_BRANCH == *"refs/tags"* || $DRONE_BRAN
|
||||
echo "Running full CI for $DRONE_BUILD_EVENT on $DRONE_BRANCH"
|
||||
pybot -v ip:$container_ip --removekeywords TAG:secret --include BAT tests/robot-cases/Group0-BAT
|
||||
upload_latest_build=true
|
||||
elif [ $DRONE_BRANCH == "master" ]; then
|
||||
echo "Package Harbor build."
|
||||
pybot --removekeywords TAG:secret --include Bundle tests/robot-cases/Group0-Distro-Harbor
|
||||
upload_latest_build=true
|
||||
elif (echo $buildinfo | grep -q "\[Specific CI="); then
|
||||
buildtype=$(echo $buildinfo | grep "\[Specific CI=")
|
||||
testsuite=$(echo $buildtype | awk -v FS="(=|])" '{print $2}')
|
||||
@ -96,16 +92,16 @@ fi
|
||||
|
||||
## --------------------------------------------- Upload Harbor Latest Build File ---------------------------------------
|
||||
if [ $upload_latest_build == true ] && [ $rc -eq 0 ]; then
|
||||
echo "update latest build file.."
|
||||
echo "update latest build file."
|
||||
harbor_build_bundle=$(basename harbor-offline-installer-*.tgz)
|
||||
echo $harbor_build_bundle
|
||||
if [[ $DRONE_BRANCH == "master" || $DRONE_BRANCH == *"refs/tags"* || $DRONE_BRANCH == "release-"* ]] && [[ $DRONE_BUILD_EVENT == "push" || $DRONE_BUILD_EVENT == "tag" ]]; then
|
||||
echo 'https://storage.googleapis.com/harbor-builds/$harbor_build_bundle' > $latest_build_file
|
||||
echo 'https://storage.googleapis.com/harbor-builds/'$harbor_build_bundle > $latest_build_file
|
||||
gsutil cp $latest_build_file gs://harbor-builds
|
||||
gsutil -D setacl public-read gs://harbor-builds/$latest_build_file &> /dev/null
|
||||
fi
|
||||
if [[ $DRONE_BRANCH == *"refs/tags"* || $DRONE_BRANCH == "release-"* ]] && [[ $DRONE_BUILD_EVENT == "push" || $DRONE_BUILD_EVENT == "tag" ]]; then
|
||||
echo 'https://storage.googleapis.com/harbor-releases/$harbor_build_bundle' > $latest_build_file
|
||||
echo 'https://storage.googleapis.com/harbor-releases/'$harbor_build_bundle > $latest_build_file
|
||||
gsutil cp $latest_build_file gs://harbor-releases
|
||||
gsutil -D setacl public-read gs://harbor-releases/$latest_build_file &> /dev/null
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user