From 2622a06612593da10cb5e4ea7a189abd5a43b4da Mon Sep 17 00:00:00 2001 From: Xin Jiang Date: Fri, 14 Feb 2025 13:48:47 +0800 Subject: [PATCH] removed acs_registry_integratio function from install.sh --- integration-tests/scripts/install.sh | 69 +--------------------------- 1 file changed, 1 insertion(+), 68 deletions(-) diff --git a/integration-tests/scripts/install.sh b/integration-tests/scripts/install.sh index e6cb23a8..34906cb3 100755 --- a/integration-tests/scripts/install.sh +++ b/integration-tests/scripts/install.sh @@ -121,72 +121,6 @@ acs_integration() { fi } -acs_registry_integration() { - local acs_central_url="" - local acs_central_username="admin" - local acs_central_password="" - if [[ "${acs_config}" == "hosted" ]]; then - acs_central_url="${ACS__CENTRAL_ENDPOINT}" - acs_central_password="${ACS__CENTRAL_PASSWORD}" - else - acs_central_url=https://$(kubectl -n rhtap-acs get route central -o 'jsonpath={.spec.host}') - acs_central_password=$(kubectl -n rhtap-acs get secret central-htpasswd -o go-template='{{index .data "password" | base64decode}}') - fi - - # if registry_config is "quay", then perform the quay integration - if [[ "${registry_config}" == "quay" ]]; then - echo "[INFO] Configure Quay integration into ACS" - - quay_host=$(kubectl -n rhtap-quay get route rhtap-quay-quay -o 'jsonpath={.spec.host}') - quay_username=$(kubectl -n rhtap-quay get secret rhtap-quay-super-user -o go-template='{{index .data "username" | base64decode}}') - quay_password=$(kubectl -n rhtap-quay get secret rhtap-quay-super-user -o go-template='{{index .data "password" | base64decode}}') - - local integration_name="rhtap-quay$RANDOM" - curl -k --silent \ - -X POST \ - -d '{"id":"","name":"'"${integration_name}"'","categories":["REGISTRY"],"quay":{"endpoint":"'"${quay_host}"'","oauthToken":"","insecure":false,"registryRobotCredentials":{"username":"'"${quay_username}"'","password":"'"${quay_password}"'"}},"autogenerated":false,"clusterId":"","skipTestIntegration":true,"type":"quay"}' \ - -u "$acs_central_username":"$acs_central_password" \ - "$acs_central_url/v1/imageintegrations" - fi - - if [[ "${acs_config}" == "new" && "${registry_config}" == "quay.io" ]]; then - echo "[INFO] Configure quay.io integration into ACS" - QUAY__API_TOKEN="${QUAY__API_TOKEN:-$(cat /usr/local/rhtap-cli-install/quay-api-token)}" - - curl -k --silent \ - -X POST \ - -d '{"id":"","name":"rhtap-quayio","categories":["REGISTRY"],"quay":{"endpoint":"'"${QUAY__HOST}"'","oauthToken":"'"${QUAY__API_TOKEN}"'","insecure":false,"registryRobotCredentials":null},"autogenerated":false,"clusterId":"","skipTestIntegration":false,"type":"quay"}' \ - -u "$acs_central_username":"$acs_central_password" \ - "$acs_central_url/v1/imageintegrations" - fi - - if [[ "${acs_config}" == "new" && "${registry_config}" == "artifactory" ]]; then - echo "[INFO] Configure Artifactory integration into ACS" - ARTIFACTORY_URL=${ARTIFACTORY_URL:-$(cat /usr/local/rhtap-cli-install/artifactory-url)} - ARTIFACTORY_USERNAME=${ARTIFACTORY_USERNAME:-$(cat /usr/local/rhtap-cli-install/artifactory-username)} - ARTIFACTORY_PASSWORD=${ARTIFACTORY_PASSWORD:-$(cat /usr/local/rhtap-cli-install/artifactory-password)} - - curl -k --silent \ - -X POST \ - -d '{"id":"","name":"rhtap-artifactory","categories":["REGISTRY"],"docker":{"endpoint":"'"${ARTIFACTORY_URL}"'","username":"'"${ARTIFACTORY_USERNAME}"'","insecure":false,"password":"'"${ARTIFACTORY_PASSWORD}"'"},"autogenerated":false,"clusterId":"","skipTestIntegration":true,"type":"artifactory"}' \ - -u "$acs_central_username":"$acs_central_password" \ - "$acs_central_url/v1/imageintegrations" - fi - - if [[ "${acs_config}" == "new" && "${registry_config}" == "nexus" ]]; then - echo "[INFO] Configure Nexus integration into ACS" - NEXUS_URL=${NEXUS_URL:-$(cat /usr/local/rhtap-cli-install/nexus-url)} - NEXUS_USERNAME=${NEXUS_USERNAME:-$(cat /usr/local/rhtap-cli-install/nexus-username)} - NEXUS_PASSWORD=${NEXUS_PASSWORD:-$(cat /usr/local/rhtap-cli-install/nexus-password)} - - curl -k --silent \ - -X POST \ - -d '{"id":"","name":"rhtap-nexus","categories":["REGISTRY"],"docker":{"endpoint":"'"${NEXUS_URL}"'","username":"'"${NEXUS_USERNAME}"'","insecure":false,"password":"'"${NEXUS_PASSWORD}"'"},"autogenerated":false,"clusterId":"","skipTestIntegration":true,"type":"nexus"}' \ - -u "$acs_central_username":"$acs_central_password" \ - "$acs_central_url/v1/imageintegrations" - fi -} - bitbucket_integration() { if [[ "${scm_config}" == "bitbucket" ]]; then echo "[INFO] Configure Bitbucket integration into RHTAP" @@ -270,5 +204,4 @@ install_rhtap() { ci_enabled update_dh_catalog_url -install_rhtap -acs_registry_integration +install_rhtap \ No newline at end of file