mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 18:25:56 +01:00
Merge pull request #11184 from bitsf/fix_build_base_image
feat(cicd) fix build base image
This commit is contained in:
commit
eebcc8fc9a
@ -3,8 +3,11 @@
|
||||
set +e
|
||||
set -o noglob
|
||||
|
||||
if [ "$1" == "" ];then
|
||||
echo "This shell will push specific image to registry server."
|
||||
echo "Usage: #./pushimage [imgae tag] [registry username] [registry password] [registry server]"
|
||||
echo "Usage: #./pushimage [image tag] [registry username] [registry password] [registry server]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Set Colors
|
||||
|
@ -95,7 +95,7 @@ export NPM_REGISTRY=$NPM_REGISTRY
|
||||
|
||||
# release branch must have their own base image with branch name, master and others will use the dev as base.
|
||||
if [[ $DRONE_BRANCH == "release-"* ]]; then
|
||||
Harbor_Build_Base_Tag=$DRONE_BRANCH
|
||||
Harbor_Build_Base_Tag=$target_release_version
|
||||
else
|
||||
Harbor_Build_Base_Tag=dev
|
||||
fi
|
||||
@ -104,6 +104,7 @@ export Harbor_Build_Base_Tag=$Harbor_Build_Base_Tag
|
||||
echo "--------------------------------------------------"
|
||||
echo "Harbor Package version: $Harbor_Package_Version"
|
||||
echo "Harbor Assets version: $Harbor_Assets_Version"
|
||||
echo "Harbor Build Base tag: $Harbor_Build_Base_Tag"
|
||||
echo "--------------------------------------------------"
|
||||
|
||||
# GS util
|
||||
|
@ -56,7 +56,7 @@ Package Harbor Offline
|
||||
Log To Console \nStart Docker Daemon
|
||||
Start Docker Daemon Locally
|
||||
Log To Console \n\nmake package_offline BASEIMAGETAG=%{Harbor_Build_Base_Tag} NPM_REGISTRY=%{NPM_REGISTRY} VERSIONTAG=%{Harbor_Assets_Version} PKGVERSIONTAG=%{Harbor_Package_Version} NOTARYFLAG=${with_notary} CLAIRFLAG=${with_clair} MIGRATORFLAG=${with_migrator} CHARTFLAG=${with_chartmuseum} TRIVYFLAG=${with_trivy} HTTPPROXY=
|
||||
${rc} ${output}= Run And Return Rc And Output make package_offline NPM_REGISTRY=%{NPM_REGISTRY} VERSIONTAG=%{Harbor_Assets_Version} PKGVERSIONTAG=%{Harbor_Package_Version} NOTARYFLAG=${with_notary} CLAIRFLAG=${with_clair} MIGRATORFLAG=${with_migrator} CHARTFLAG=${with_chartmuseum} TRIVYFLAG=${with_trivy} HTTPPROXY=
|
||||
${rc} ${output}= Run And Return Rc And Output make package_offline BASEIMAGETAG=%{Harbor_Build_Base_Tag} NPM_REGISTRY=%{NPM_REGISTRY} VERSIONTAG=%{Harbor_Assets_Version} PKGVERSIONTAG=%{Harbor_Package_Version} NOTARYFLAG=${with_notary} CLAIRFLAG=${with_clair} MIGRATORFLAG=${with_migrator} CHARTFLAG=${with_chartmuseum} TRIVYFLAG=${with_trivy} HTTPPROXY=
|
||||
Log To Console ${rc}
|
||||
Log To Console ${output}
|
||||
Should Be Equal As Integers ${rc} 0
|
||||
|
Loading…
Reference in New Issue
Block a user