From ae7834af0b0590947e34a50cadc9bc90d5fa43d4 Mon Sep 17 00:00:00 2001 From: Ziming Zhang Date: Mon, 23 Mar 2020 19:08:12 +0800 Subject: [PATCH] feat(cicd) fix build base image Signed-off-by: Ziming Zhang --- make/pushimage.sh | 5 ++++- tests/integration.sh | 3 ++- tests/resources/Harbor-Util.robot | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/make/pushimage.sh b/make/pushimage.sh index 2affa58bc0..2cbab67b96 100755 --- a/make/pushimage.sh +++ b/make/pushimage.sh @@ -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 diff --git a/tests/integration.sh b/tests/integration.sh index 4b63128e5a..9bdc373506 100755 --- a/tests/integration.sh +++ b/tests/integration.sh @@ -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 diff --git a/tests/resources/Harbor-Util.robot b/tests/resources/Harbor-Util.robot index dea757824a..723b34d14c 100644 --- a/tests/resources/Harbor-Util.robot +++ b/tests/resources/Harbor-Util.robot @@ -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