feat(cicd) fix build base image

Signed-off-by: Ziming Zhang <zziming@vmware.com>
This commit is contained in:
Ziming Zhang 2020-03-23 19:08:12 +08:00
parent e8ca51a18f
commit ae7834af0b
3 changed files with 7 additions and 3 deletions

View File

@ -3,8 +3,11 @@
set +e set +e
set -o noglob set -o noglob
if [ "$1" == "" ];then
echo "This shell will push specific image to registry server." 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 # Set Colors

View File

@ -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. # 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 if [[ $DRONE_BRANCH == "release-"* ]]; then
Harbor_Build_Base_Tag=$DRONE_BRANCH Harbor_Build_Base_Tag=$target_release_version
else else
Harbor_Build_Base_Tag=dev Harbor_Build_Base_Tag=dev
fi fi
@ -104,6 +104,7 @@ export Harbor_Build_Base_Tag=$Harbor_Build_Base_Tag
echo "--------------------------------------------------" echo "--------------------------------------------------"
echo "Harbor Package version: $Harbor_Package_Version" echo "Harbor Package version: $Harbor_Package_Version"
echo "Harbor Assets version: $Harbor_Assets_Version" echo "Harbor Assets version: $Harbor_Assets_Version"
echo "Harbor Build Base tag: $Harbor_Build_Base_Tag"
echo "--------------------------------------------------" echo "--------------------------------------------------"
# GS util # GS util

View File

@ -56,7 +56,7 @@ Package Harbor Offline
Log To Console \nStart Docker Daemon Log To Console \nStart Docker Daemon
Start Docker Daemon Locally 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= 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 ${rc}
Log To Console ${output} Log To Console ${output}
Should Be Equal As Integers ${rc} 0 Should Be Equal As Integers ${rc} 0