Skip to content

Commit

Permalink
removed acs_registry_integratio function from install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
xinredhat authored and Roming22 committed Feb 14, 2025
1 parent a2c4811 commit 2622a06
Showing 1 changed file with 1 addition and 68 deletions.
69 changes: 1 addition & 68 deletions integration-tests/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -270,5 +204,4 @@ install_rhtap() {

ci_enabled
update_dh_catalog_url
install_rhtap
acs_registry_integration
install_rhtap

0 comments on commit 2622a06

Please sign in to comment.