mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-24 01:27:49 +01:00
Clear local images in nightly test
Remove local image right after pushing operation, then pull operation can be triggered by docker 20. Signed-off-by: danfengliu <danfengl@vmware.com>
This commit is contained in:
parent
d32a243508
commit
076ebb5ee8
@ -34,6 +34,8 @@ Pull image
|
||||
Should Contain ${output} Digest:
|
||||
Should Contain ${output} Status:
|
||||
Should Not Contain ${output} No such image:
|
||||
#Remove image for docker 20
|
||||
Wait Unitl Command Success docker rmi -f ${ip}/${project}/${image_with_tag}
|
||||
|
||||
Push image
|
||||
# If no tag provided in $(image_with_or_without_tag}, latest will be the tag pulled from docker-hub or read from local
|
||||
@ -51,6 +53,9 @@ Push image
|
||||
... ELSE Wait Unitl Command Success docker tag ${image_in_use} ${ip}/${project}/${image_in_use_with_tag}
|
||||
Wait Unitl Command Success docker push ${ip}/${project}/${image_in_use_with_tag}
|
||||
Wait Unitl Command Success docker logout ${ip}
|
||||
#Remove image for docker 20
|
||||
Wait Unitl Command Success docker rmi -f ${ip}/${project}/${image_in_use_with_tag}
|
||||
Run Keyword If ${need_pull_first}==${true} Wait Unitl Command Success docker rmi -f ${LOCAL_REGISTRY}/${LOCAL_REGISTRY_NAMESPACE}/${image_in_use}
|
||||
Sleep 1
|
||||
|
||||
Push Image With Tag
|
||||
@ -62,6 +67,9 @@ Push Image With Tag
|
||||
Wait Unitl Command Success docker tag ${LOCAL_REGISTRY}/${LOCAL_REGISTRY_NAMESPACE}/${image}:${tag1} ${ip}/${project}/${image}:${tag}
|
||||
Wait Unitl Command Success docker push ${ip}/${project}/${image}:${tag}
|
||||
Wait Unitl Command Success docker logout ${ip}
|
||||
#Remove image for docker 20
|
||||
Wait Unitl Command Success docker rmi -f ${ip}/${project}/${image}:${tag}
|
||||
Wait Unitl Command Success docker rmi -f ${LOCAL_REGISTRY}/${LOCAL_REGISTRY_NAMESPACE}/${image}:${tag1}
|
||||
|
||||
Cannot Docker Login Harbor
|
||||
[Arguments] ${ip} ${user} ${pwd}
|
||||
|
@ -224,12 +224,14 @@ Test Case - User View Projects
|
||||
Test Case - User View Logs
|
||||
Init Chrome Driver
|
||||
${d}= Get Current Date result_format=%m%s
|
||||
${img}= Set Variable kong
|
||||
${tag}= Set Variable latest
|
||||
|
||||
Sign In Harbor ${HARBOR_URL} user002 Test1@34
|
||||
Create An New Project And Go Into Project project${d}
|
||||
|
||||
Push image ${ip} user002 Test1@34 project${d} busybox:latest
|
||||
Pull image ${ip} user002 Test1@34 project${d} busybox:latest
|
||||
Push image ${ip} user002 Test1@34 project${d} ${img}:${tag}
|
||||
Pull image ${ip} user002 Test1@34 project${d} ${img}:${tag}
|
||||
|
||||
Go Into Project project${d}
|
||||
Delete Repo project${d}
|
||||
|
Loading…
Reference in New Issue
Block a user