Log To Console make package_offline GOBUILDTAGS="include_oss include_gcs" BASEIMAGETAG=%{Harbor_Build_Base_Tag} NPM_REGISTRY=%{NPM_REGISTRY} VERSIONTAG=%{Harbor_Assets_Version} PKGVERSIONTAG=%{Harbor_Package_Version} NOTARYFLAG=${with_notary} CHARTFLAG=${with_chartmuseum} TRIVYFLAG=${with_trivy} HTTPPROXY=
${rc} ${output}= Run And Return Rc And Output make package_offline GOBUILDTAGS="include_oss include_gcs" BASEIMAGETAG=%{Harbor_Build_Base_Tag} NPM_REGISTRY=%{NPM_REGISTRY} VERSIONTAG=%{Harbor_Assets_Version} PKGVERSIONTAG=%{Harbor_Package_Version} NOTARYFLAG=${with_notary} CHARTFLAG=${with_chartmuseum} TRIVYFLAG=${with_trivy} HTTPPROXY=
${rc} ${output}= Run And Return Rc And Output make package_online GOBUILDTAGS="include_oss include_gcs" VERSIONTAG=%{Harbor_Assets_Version} PKGVERSIONTAG=%{Harbor_Package_Version} NOTARYFLAG=${with_notary} CHARTFLAG=${with_chartmuseum} TRIVYFLAG=${with_trivy} HTTPPROXY=
Log ${rc}
Log ${output}
Should Be Equal As Integers ${rc} 0
Switch To LDAP
Down Harbor
${rc} ${output}= Run And Return Rc And Output rm -rf /data
Log ${rc}
Should Be Equal As Integers ${rc} 0
Prepare Cert
Config Harbor cfg auth=ldap_auth http_proxy=https
Prepare
Up Harbor
Docker Pull osixia/openldap:1.1.7
${rc} ${output}= Run And Return Rc And Output cd tests && ./ldapprepare.sh
Log ${rc}
Log ${output}
Should Be Equal As Integers ${rc} 0
${rc} ${output}= Run And Return Rc And Output docker ps
Log ${output}
Should Be Equal As Integers ${rc} 0
Generate Certificate Authority For Chrome
Get Harbor CA
[Arguments] ${ip} ${cert}
Log All Start to get harbor ca: ${ip} ${cert}
Run Keyword If '${http_get_ca}' == 'false' Run Keywords
${rc} ${output}= Run And Return Rc And Output make install swagger_client NOTARYFLAG=${with_notary} CHARTFLAG=${with_chartmuseum} HTTPPROXY=
Log ${output}
Should Be Equal As Integers ${rc} 0
Sleep 20
Wait for Harbor Ready
[Arguments] ${protocol} ${HARBOR_IP}
Log To Console Waiting for Harbor to Come Up...
FOR ${i} IN RANGE 20
${out}= Run curl -k ${protocol}://${HARBOR_IP}
Log ${out}
${status}= Run Keyword And Return Status Should Not Contain ${out} 502 Bad Gateway
${status}= Run Keyword If ${status} Run Keyword And Return Status Should Not Contain ${out} Connection refused
${status}= Run Keyword If ${status} Run Keyword And Return Status Should Contain ${out} <title>Harbor</title>
Return From Keyword If ${status} ${HARBOR_IP}
Sleep 30s
END
Fail Harbor failed to come up properly!
Get Harbor Version
${rc} ${output}= Run And Return Rc And Output curl -k -X GET --header 'Accept: application/json' 'https://${ip}/api/v2.0/systeminfo'|grep -i harbor_version