fix: migrate cicd to registry goharbor (#20872)

* fix: migrate cicd to registry goharbor

Signed-off-by: Shengwen Yu <yshengwen@vmware.com>

* fix: use ${LOCAL_REGISTRY}

Signed-off-by: Shengwen Yu <yshengwen@vmware.com>

---------

Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
This commit is contained in:
Shengwen YU 2024-08-26 14:43:52 +08:00 committed by GitHub
parent 15b3d53a29
commit 1fd606a02b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 9 additions and 9 deletions

View File

@ -72,7 +72,7 @@ class TestProxyCache(unittest.TestCase):
index_for_ctr = dict(image = "alpine", tag = "3.12.0")
else:
user_namespace = "nightly"
registry = "https://cicd.harbor.vmwarecna.net"
registry = "https://registry.goharbor.io"
index_for_ctr = dict(image = "busybox", tag = "1.32.0")
registry_id, _ = self.registry.create_registry(registry, name=_random_name(registry_type), registry_type=registry_type, access_key = access_key, access_secret = access_secret, insecure=True, **ADMIN_CLIENT)

View File

@ -244,7 +244,7 @@ Test Case - User View Logs
Create An New Project And Go Into Project project${d}
Logout Harbor
Body Of Replication Of Pull Images from Registry To Self harbor https://cicd.harbor.vmwarecna.net ${null} ${null} nightly/${replication_image} project${d} N Flatten 1 Level @{target_images}
Body Of Replication Of Pull Images from Registry To Self harbor https://${LOCAL_REGISTRY} ${null} ${null} nightly/${replication_image} project${d} N Flatten 1 Level @{target_images}
Push image ${ip} ${user} ${pwd} project${d} ${img}:${tag}
Pull image ${ip} ${user} ${pwd} project${d} ${replication_image}:${replication_tag}
@ -1118,7 +1118,7 @@ Test Case - Job Service Dashboard Workers
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Create An New Project And Go Into Project ${project_name}
Switch to Registries
Create A New Endpoint harbor ${endpoint_name} https://cicd.harbor.vmwarecna.net ${null} ${null}
Create A New Endpoint harbor ${endpoint_name} https://${LOCAL_REGISTRY} ${null} ${null}
Switch To Replication Manage
Create A Rule With Existing Endpoint ${rule_name} pull nightly/test_replication image ${endpoint_name} ${project_name} bandwidth=50 bandwidth_unit=Mbps
Select Rule And Replicate ${rule_name}

View File

@ -119,7 +119,7 @@ Test Case - Ldap Group Admin DN Setting
Logout Harbor
Sign In Harbor ${HARBOR_URL} mike zhu88jie
Switch To Registries
Create A New Endpoint harbor edp1${d} https://cicd.harbor.vmwarecna.net ${null} ${null} Y
Create A New Endpoint harbor edp1${d} https://${LOCAL_REGISTRY} ${null} ${null} Y
Test Case - Run LDAP Group Related API Test

View File

@ -120,7 +120,7 @@ Test Case - OIDC Group User
${pwd}= Set Variable ${admin_pwd}
Sign In Harbor With OIDC User ${HARBOR_URL} username=${admin_user} password=${admin_pwd} login_with_provider=ldap
Switch To Registries
Create A New Endpoint harbor test_oidc_admin https://cicd.harbor.vmwarecna.net ${null} ${null} Y
Create A New Endpoint harbor test_oidc_admin https://${LOCAL_REGISTRY} ${null} ${null} Y
${secret}= Get Secrete By API ${HARBOR_URL} username=${admin_user}
Push image ${ip} ${admin_user} ${secret} library ${image}
Logout Harbor

View File

@ -93,7 +93,7 @@ Test Case - Replication Rule Edit
${cron_str}= Set Variable 0 0 0 * * 0
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Switch To Registries
Create A New Endpoint harbor ${endpoint1} https://cicd.harbor.vmwarecna.net ${null} ${null} Y
Create A New Endpoint harbor ${endpoint1} https://${LOCAL_REGISTRY} ${null} ${null} Y
Create A New Endpoint harbor ${endpoint2} https://${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} Y
Switch To Replication Manage
Create A Rule With Existing Endpoint ${rule_name_old} pull nightly/a* image ${endpoint1} project${d}
@ -312,7 +312,7 @@ Test Case - Replication Of Pull Manifest List and CNAB from Harbor To Self
${image2}= Get From Dictionary ${image2_with_tag} image
${image3}= Get From Dictionary ${image3_with_tag} image
@{target_images}= Create List '&{image1_with_tag}' '&{image2_with_tag}' '&{image3_with_tag}'
Body Of Replication Of Pull Images from Registry To Self harbor https://cicd.harbor.vmwarecna.net ${null} ${null} nightly/{${image1},${image2},${image3}} ${null} Y Flatten 1 Level @{target_images}
Body Of Replication Of Pull Images from Registry To Self harbor https://${LOCAL_REGISTRY} ${null} ${null} nightly/{${image1},${image2},${image3}} ${null} Y Flatten 1 Level @{target_images}
Test Case - Image Namespace Level Flattening
[tags] flattening

View File

@ -28,7 +28,7 @@ ${HARBOR_ADMIN} admin
Test Case - Proxy Cache
[Tags] proxy_cache
${d}= Get Current Date result_format=%m%s
${registry}= Set Variable https://cicd.harbor.vmwarecna.net
${registry}= Set Variable https://${LOCAL_REGISTRY}
${user_namespace}= Set Variable nightly
${image}= Set Variable for_proxy
${tag}= Set Variable 1.0
@ -156,7 +156,7 @@ Test Case - Replication Schedule Job
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Create An New Project And Go Into Project ${project_name}
Switch To Registries
Create A New Endpoint harbor e${d} https://cicd.harbor.vmwarecna.net ${null} ${null} Y
Create A New Endpoint harbor e${d} https://${LOCAL_REGISTRY} ${null} ${null} Y
Switch To Replication Manage
${flag}= Set Variable ${false}
FOR ${i} IN RANGE 999999