Add login for docker-hub in package build proces (#13526)

Signed-off-by: danfengliu <danfengl@vmware.com>
This commit is contained in:
danfengliu 2020-11-17 10:55:49 +08:00 committed by GitHub
parent aa61f66d0b
commit 341b8f0c7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -114,8 +114,7 @@ function uploader {
function package_installer {
echo "Package Harbor offline installer."
docker login -u $DOCKER_HUB_USERNAME -p $DOCKER_HUB_PASSWORD
pybot --removekeywords TAG:secret --include Bundle tests/robot-cases/Group0-Distro-Harbor
pybot --removekeywords TAG:secret --include Bundle -v DOCKER_HUB_USERNAME:$DOCKER_HUB_USERNAME -v DOCKER_HUB_PASSWORD:$DOCKER_HUB_PASSWORD tests/robot-cases/Group0-Distro-Harbor
harbor_offline_build_bundle=$(basename harbor-offline-installer-*.tgz)
harbor_online_build_bundle=$(basename harbor-online-installer-*.tgz)
upload_build=true

View File

@ -55,6 +55,7 @@ Package Harbor Offline
[Arguments] ${with_notary}=true ${with_clair}=true ${with_migrator}=true ${with_chartmuseum}=true
Log To Console \nStart Docker Daemon
Start Docker Daemon Locally
docker login -u $DOCKER_HUB_USERNAME -p $DOCKER_HUB_PASSWORD
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} 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} HTTPPROXY=
Log To Console ${rc}
@ -65,6 +66,7 @@ Package Harbor Online
[Arguments] ${with_notary}=true ${with_clair}=true ${with_migrator}=false ${with_chartmuseum}=true
Log To Console \nStart Docker Daemon
Start Docker Daemon Locally
docker login -u $DOCKER_HUB_USERNAME -p $DOCKER_HUB_PASSWORD
Log To Console \nmake package_online VERSIONTAG=%{Harbor_Assets_Version} PKGVERSIONTAG=%{Harbor_Package_Version} NOTARYFLAG=${with_notary} CLAIRFLAG=${with_clair} MIGRATORFLAG=${with_migrator} CHARTFLAG=${with_chartmuseum} HTTPPROXY=
${rc} ${output}= Run And Return Rc And Output make package_online VERSIONTAG=%{Harbor_Assets_Version} PKGVERSIONTAG=%{Harbor_Package_Version} NOTARYFLAG=${with_notary} CLAIRFLAG=${with_clair} MIGRATORFLAG=${with_migrator} CHARTFLAG=${with_chartmuseum} HTTPPROXY=
Log ${rc}