mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-23 07:11:36 +01:00
Add manifest and CNAB replication tests
1. Add manifest and CNAB replication tests; 2. Duplicate ORAS and sigularity tests from API test to nightly common tests; 3. Optimize get dns code in CI; 4. Optimize E2E dockerfile; 5. Sample image size should be cover requirement for large size like 512M. Signed-off-by: danfengliu <danfengl@vmware.com>
This commit is contained in:
parent
3322716bc6
commit
072f364d0b
@ -196,6 +196,7 @@ Restart Process Locally
|
||||
|
||||
Prepare Docker Cert In Ubuntu
|
||||
[Arguments] ${ip} ${cert}
|
||||
Wait Unitl Command Success rm -rf ~/.docker/
|
||||
Wait Unitl Command Success mkdir -p /etc/docker/certs.d/${ip}
|
||||
Wait Unitl Command Success cp ${cert} /etc/docker/certs.d/${ip}
|
||||
Wait Unitl Command Success cp ${cert} /usr/local/share/ca-certificates/
|
||||
|
@ -337,27 +337,27 @@ Retry Get Statics
|
||||
[Return] ${ret}
|
||||
|
||||
Get Statics Private Repo
|
||||
${privaterepo}= Retry Get Statics //projects/div/div/div[1]/div/statistics-panel/div/div[2]/div[1]/div[2]/div[2]/statistics/div/span[1]
|
||||
${privaterepo}= Retry Get Statics ${project_statistics_private_repository_icon}
|
||||
[Return] ${privaterepo}
|
||||
|
||||
Get Statics Private Project
|
||||
${privateproj}= Retry Get Statics //projects/div/div/div[1]/div/statistics-panel/div/div[2]/div[1]/div[2]/div[1]/statistics/div/span[1]
|
||||
${privateproj}= Retry Get Statics //projects/div/div/div[1]/div/statistics-panel/div/div[1]/div/div[1]/div[2]
|
||||
[Return] ${privateproj}
|
||||
|
||||
Get Statics Public Repo
|
||||
${publicrepo}= Retry Get Statics //projects/div/div/div[1]/div/statistics-panel/div/div[2]/div[1]/div[3]/div[2]/statistics/div/span[1]
|
||||
${publicrepo}= Retry Get Statics //projects/div/div/div[1]/div/statistics-panel/div/div[1]/div/div[2]/div[2]
|
||||
[Return] ${publicrepo}
|
||||
|
||||
Get Statics Public Project
|
||||
${publicproj}= Retry Get Statics //projects/div/div/div[1]/div/statistics-panel/div/div[2]/div[1]/div[3]/div[1]/statistics/div/span[1]
|
||||
${publicproj}= Retry Get Statics //projects/div/div/div[1]/div/statistics-panel/div/div[1]/div/div[2]/div[2]
|
||||
[Return] ${publicproj}
|
||||
|
||||
Get Statics Total Repo
|
||||
${totalrepo}= Retry Get Statics //projects/div/div/div[1]/div/statistics-panel/div/div[2]/div[1]/div[4]/div[2]/statistics/div/span[1]
|
||||
${totalrepo}= Retry Get Statics //projects/div/div/div[1]/div/statistics-panel/div/div[2]/div/div[3]/div[2]
|
||||
[Return] ${totalrepo}
|
||||
|
||||
Get Statics Total Project
|
||||
${totalproj}= Retry Get Statics //projects/div/div/div[1]/div/statistics-panel/div/div[2]/div[1]/div[4]/div[1]/statistics/div/span[1]
|
||||
${totalproj}= Retry Get Statics //projects/div/div/div[1]/div/statistics-panel/div/div[1]/div/div[3]/div[2]
|
||||
[Return] ${totalproj}
|
||||
|
||||
Input Count Quota
|
||||
|
@ -34,7 +34,7 @@ ${project_tag_immutability_switch} //project-detail/app-tag-feature-integration
|
||||
${create_project_CANCEL_button_xpath} xpath=//button[contains(.,'CANCEL')]
|
||||
${create_project_OK_button_xpath} xpath=//button[contains(.,'OK')]
|
||||
${delete_confirm_btn} xpath=//button[contains(.,'DELETE')]
|
||||
${project_statistics_private_repository_icon} xpath=//projects/div/div/div[1]/div/statistics-panel/div/div[2]/div[1]/div[2]/div[2]/statistics/div/span[1]
|
||||
${project_statistics_private_repository_icon} xpath=//projects/div/div/div[1]/div/statistics-panel/div/div[2]/div/div[1]/div[2]
|
||||
${project_statistics_total_projects_icon} xpath=//div[contains(@class, 'statistic-column-block') and contains(., 'TOTAL')]//div[1]/statistics//span[contains(@class, 'statistic-data')]
|
||||
${repo_delete_confirm_btn} xpath=//clr-modal//button[2]
|
||||
${repo_retag_confirm_dlg} css=${modal-dialog}
|
||||
|
@ -93,6 +93,7 @@ Switch To LDAP
|
||||
Get Harbor CA
|
||||
[Arguments] ${ip} ${cert}
|
||||
Log All Start to get harbor ca: ${ip} ${cert}
|
||||
#In API E2E engine, store cert in path "/ca"
|
||||
Run Keyword If '${http_get_ca}' == 'false' Run Keywords
|
||||
... Wait Unitl Command Success cp /ca/harbor_ca.crt ${cert}
|
||||
... AND Return From Keyword
|
||||
@ -102,13 +103,6 @@ Get Harbor CA
|
||||
Log All ${output}
|
||||
Should Be Equal As Integers ${rc} 0
|
||||
|
||||
Enable Notary Client
|
||||
${rc} ${output}= Run And Return Rc And Output rm -rf ~/.docker/
|
||||
Log ${rc}
|
||||
${rc} ${output}= Run And Return Rc and Output curl -o /notary_ca.crt -s -k -X GET -u 'admin:Harbor12345' 'https://${ip}/api/v2.0/systeminfo/getcert'
|
||||
Log ${output}
|
||||
Should Be Equal As Integers ${rc} 0
|
||||
|
||||
Notary Remove Signature
|
||||
[Arguments] ${ip} ${project} ${image} ${tag} ${user} ${pwd}
|
||||
${rc} ${output}= Run And Return Rc And Output ./tests/robot-cases/Group0-Util/notary-util.sh remove ${ip} ${project} ${image} ${tag} ${notaryServerEndpoint} ${user} ${pwd}
|
||||
|
@ -27,14 +27,14 @@ Helm Repo Add
|
||||
[Arguments] ${harbor_url} ${user} ${pwd} ${project_name}=library ${helm_repo_name}=myrepo
|
||||
${rc} ${output}= Run And Return Rc And Output helm repo remove ${project_name}
|
||||
Log To Console ${output}
|
||||
Wait Unitl Command Success helm repo add --ca-file /ca/ca.crt --username=${user} --password=${pwd} ${helm_repo_name} ${harbor_url}/chartrepo/${project_name}
|
||||
Wait Unitl Command Success helm repo add --username=${user} --password=${pwd} ${helm_repo_name} ${harbor_url}/chartrepo/${project_name}
|
||||
|
||||
Helm Repo Push
|
||||
[Arguments] ${user} ${pwd} ${chart_filename} ${helm_repo_name}=myrepo ${helm_cmd}=helm
|
||||
${current_dir}= Run pwd
|
||||
Run cd ${current_dir}
|
||||
Run wget ${harbor_chart_file_url}
|
||||
Wait Unitl Command Success ${helm_cmd} push --ca-file=/ca/ca.crt --username=${user} --password=${pwd} ${chart_filename} ${helm_repo_name}
|
||||
Wait Unitl Command Success ${helm_cmd} push --username=${user} --password=${pwd} ${chart_filename} ${helm_repo_name}
|
||||
|
||||
Helm Chart Push
|
||||
[Arguments] ${ip} ${user} ${pwd} ${chart_file} ${archive} ${project} ${repo_name} ${verion}
|
||||
|
@ -166,8 +166,7 @@ Body Of Push Signed Image
|
||||
|
||||
Body Of Admin Push Signed Image
|
||||
[Arguments] ${project} ${image} ${tag} ${user} ${pwd} ${with_remove}=${false}
|
||||
Enable Notary Client
|
||||
|
||||
Wait Unitl Command Success rm -rf ~/.docker/
|
||||
Docker Pull ${LOCAL_REGISTRY}/${LOCAL_REGISTRY_NAMESPACE}/${image}
|
||||
${rc} ${output}= Run And Return Rc And Output ./tests/robot-cases/Group0-Util/notary-push-image.sh ${ip} ${project} ${image} ${tag} ${notaryServerEndpoint} ${LOCAL_REGISTRY}/${LOCAL_REGISTRY_NAMESPACE}/${image}:${tag} ${user} ${pwd}
|
||||
Clean All Local Images
|
||||
|
@ -1,24 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
#docker pull $3:$4
|
||||
set -x
|
||||
|
||||
IP=$1
|
||||
USER=$7
|
||||
PWD=$8
|
||||
PASSHRASE=$8
|
||||
notaryServerEndpoint=$5
|
||||
tag_src=$6
|
||||
USER=$7
|
||||
PASSHRASE=$8
|
||||
echo $IP
|
||||
|
||||
mkdir -p /etc/docker/certs.d/$IP/
|
||||
mkdir -p ~/.docker/tls/$IP:4443/
|
||||
|
||||
cp /notary_ca.crt /etc/docker/certs.d/$IP/
|
||||
cp /notary_ca.crt ~/.docker/tls/$IP:4443/
|
||||
|
||||
mkdir -p ~/.docker/tls/$notaryServerEndpoint/
|
||||
cp /notary_ca.crt ~/.docker/tls/$notaryServerEndpoint/
|
||||
|
||||
export DOCKER_CONTENT_TRUST=1
|
||||
export DOCKER_CONTENT_TRUST_SERVER=https://$notaryServerEndpoint
|
||||
|
||||
@ -30,6 +21,6 @@ export DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE=$PASSHRASE
|
||||
export DOCKER_CONTENT_TRUST_OFFLINE_PASSPHRASE=$PASSHRASE
|
||||
export DOCKER_CONTENT_TRUST_TAGGING_PASSPHRASE=$PASSHRASE
|
||||
|
||||
docker login -u $USER -p $PWD $IP
|
||||
docker login -u $USER -p $PASSHRASE $IP
|
||||
docker tag $tag_src $IP/$2/$3:$4
|
||||
docker push $IP/$2/$3:$4
|
||||
|
@ -23,7 +23,7 @@ export DOCKER_CONTENT_TRUST_TAGGING_PASSPHRASE=$PASSHRASE
|
||||
export NOTARY_AUTH=$(echo $USER:$PWD | base64)
|
||||
echo $USER:$PWD
|
||||
|
||||
NOTARY_CMD_OPTIONS="notary -s https://$NOTARY_SERVER_ENDPOINT --tlscacert /notary_ca.crt -d /root/.docker/trust"
|
||||
NOTARY_CMD_OPTIONS="notary -s https://$NOTARY_SERVER_ENDPOINT -d ~/.docker/trust"
|
||||
if [ "$CMD" == "key_rotate" ]; then
|
||||
echo "$NOTARY_CMD_OPTIONS key rotate $HOST/$PROJECT/$IMAGE snapshot -r"
|
||||
$NOTARY_CMD_OPTIONS key rotate $HOST/$PROJECT/$IMAGE snapshot -r
|
||||
|
Loading…
Reference in New Issue
Block a user