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") index_for_ctr = dict(image = "alpine", tag = "3.12.0")
else: else:
user_namespace = "nightly" user_namespace = "nightly"
registry = "https://cicd.harbor.vmwarecna.net" registry = "https://registry.goharbor.io"
index_for_ctr = dict(image = "busybox", tag = "1.32.0") 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) 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} Create An New Project And Go Into Project project${d}
Logout Harbor 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} Push image ${ip} ${user} ${pwd} project${d} ${img}:${tag}
Pull image ${ip} ${user} ${pwd} project${d} ${replication_image}:${replication_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} Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Create An New Project And Go Into Project ${project_name} Create An New Project And Go Into Project ${project_name}
Switch to Registries 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 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 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} Select Rule And Replicate ${rule_name}

View File

@ -119,7 +119,7 @@ Test Case - Ldap Group Admin DN Setting
Logout Harbor Logout Harbor
Sign In Harbor ${HARBOR_URL} mike zhu88jie Sign In Harbor ${HARBOR_URL} mike zhu88jie
Switch To Registries 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 Test Case - Run LDAP Group Related API Test

View File

@ -120,7 +120,7 @@ Test Case - OIDC Group User
${pwd}= Set Variable ${admin_pwd} ${pwd}= Set Variable ${admin_pwd}
Sign In Harbor With OIDC User ${HARBOR_URL} username=${admin_user} password=${admin_pwd} login_with_provider=ldap Sign In Harbor With OIDC User ${HARBOR_URL} username=${admin_user} password=${admin_pwd} login_with_provider=ldap
Switch To Registries 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} ${secret}= Get Secrete By API ${HARBOR_URL} username=${admin_user}
Push image ${ip} ${admin_user} ${secret} library ${image} Push image ${ip} ${admin_user} ${secret} library ${image}
Logout Harbor Logout Harbor

View File

@ -93,7 +93,7 @@ Test Case - Replication Rule Edit
${cron_str}= Set Variable 0 0 0 * * 0 ${cron_str}= Set Variable 0 0 0 * * 0
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Switch To Registries 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 Create A New Endpoint harbor ${endpoint2} https://${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} Y
Switch To Replication Manage Switch To Replication Manage
Create A Rule With Existing Endpoint ${rule_name_old} pull nightly/a* image ${endpoint1} project${d} 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 ${image2}= Get From Dictionary ${image2_with_tag} image
${image3}= Get From Dictionary ${image3_with_tag} image ${image3}= Get From Dictionary ${image3_with_tag} image
@{target_images}= Create List '&{image1_with_tag}' '&{image2_with_tag}' '&{image3_with_tag}' @{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 Test Case - Image Namespace Level Flattening
[tags] flattening [tags] flattening

View File

@ -28,7 +28,7 @@ ${HARBOR_ADMIN} admin
Test Case - Proxy Cache Test Case - Proxy Cache
[Tags] proxy_cache [Tags] proxy_cache
${d}= Get Current Date result_format=%m%s ${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 ${user_namespace}= Set Variable nightly
${image}= Set Variable for_proxy ${image}= Set Variable for_proxy
${tag}= Set Variable 1.0 ${tag}= Set Variable 1.0
@ -156,7 +156,7 @@ Test Case - Replication Schedule Job
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Create An New Project And Go Into Project ${project_name} Create An New Project And Go Into Project ${project_name}
Switch To Registries 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 Switch To Replication Manage
${flag}= Set Variable ${false} ${flag}= Set Variable ${false}
FOR ${i} IN RANGE 999999 FOR ${i} IN RANGE 999999