diff --git a/.ibm/pipelines/jobs/aks.sh b/.ibm/pipelines/jobs/aks.sh index 6f0616d641..506b345b76 100644 --- a/.ibm/pipelines/jobs/aks.sh +++ b/.ibm/pipelines/jobs/aks.sh @@ -17,13 +17,17 @@ handle_aks() { az_aks_approuting_enable "${AKS_NIGHTLY_CLUSTER_NAME}" "${AKS_NIGHTLY_CLUSTER_RESOURCEGROUP}" az_aks_get_credentials "${AKS_NIGHTLY_CLUSTER_NAME}" "${AKS_NIGHTLY_CLUSTER_RESOURCEGROUP}" + API_SERVER_URL=$(oc whoami --show-server) + ENCODED_API_SERVER_URL=$(echo "${API_SERVER_URL}" | base64) + ENCODED_CLUSTER_NAME=$(echo "my-cluster" | base64) + set_github_app_3_credentials initiate_aks_deployment check_and_test "${RELEASE_NAME}" "${NAME_SPACE_K8S}" "${url}" delete_namespace "${NAME_SPACE_K8S}" initiate_rbac_aks_deployment - check_and_test "${RELEASE_NAME_RBAC}" "${NAME_SPACE_RBAC_K8S}" + check_and_test "${RELEASE_NAME_RBAC}" "${NAME_SPACE_RBAC_K8S}" "${url}" delete_namespace "${NAME_SPACE_RBAC_K8S}" } diff --git a/.ibm/pipelines/jobs/gke.sh b/.ibm/pipelines/jobs/gke.sh index 53fe21cb6d..9a67078d5b 100644 --- a/.ibm/pipelines/jobs/gke.sh +++ b/.ibm/pipelines/jobs/gke.sh @@ -7,18 +7,23 @@ handle_gke() { export K8S_CLUSTER_ROUTER_BASE=$GKE_INSTANCE_DOMAIN_NAME export NAME_SPACE_K8S="showcase-k8s-ci-nightly" export NAME_SPACE_RBAC_K8S="showcase-rbac-k8s-ci-nightly" + url="https://${K8S_CLUSTER_ROUTER_BASE}" gcloud_auth "${GKE_SERVICE_ACCOUNT_NAME}" "/tmp/secrets/GKE_SERVICE_ACCOUNT_KEY" gcloud_gke_get_credentials "${GKE_CLUSTER_NAME}" "${GKE_CLUSTER_REGION}" "${GOOGLE_CLOUD_PROJECT}" + API_SERVER_URL=$(oc whoami --show-server) + ENCODED_API_SERVER_URL=$(echo "${API_SERVER_URL}" | base64) + ENCODED_CLUSTER_NAME=$(echo "my-cluster" | base64) + set_github_app_3_credentials initiate_gke_deployment check_and_test "${RELEASE_NAME}" "${NAME_SPACE_K8S}" "${url}" delete_namespace "${NAME_SPACE_K8S}" initiate_rbac_gke_deployment - check_and_test "${RELEASE_NAME_RBAC}" "${NAME_SPACE_RBAC_K8S}" + check_and_test "${RELEASE_NAME_RBAC}" "${NAME_SPACE_RBAC_K8S}" "${url}" delete_namespace "${NAME_SPACE_RBAC_K8S}" } diff --git a/.ibm/pipelines/openshift-ci-tests.sh b/.ibm/pipelines/openshift-ci-tests.sh index 422c74b526..85f57c9fc7 100755 --- a/.ibm/pipelines/openshift-ci-tests.sh +++ b/.ibm/pipelines/openshift-ci-tests.sh @@ -5,7 +5,7 @@ export PS4='[$(date "+%Y-%m-%d %H:%M:%S")] ' # logs timestamp for every cmd. LOGFILE="test-log" export DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -secret_name="rhdh-k8s-plugin-secret" +export secret_name="rhdh-k8s-plugin-secret" OVERALL_RESULT=0 cleanup() { @@ -56,7 +56,7 @@ main() { ;; *gke*) echo "Calling handle_gke" - handle_gke + handle_gke ;; *periodic*) echo "Calling handle_periodic" diff --git a/.ibm/pipelines/utils.sh b/.ibm/pipelines/utils.sh index 694ead30db..1282c9b812 100755 --- a/.ibm/pipelines/utils.sh +++ b/.ibm/pipelines/utils.sh @@ -691,6 +691,4 @@ oc_login() { oc login --token="${K8S_CLUSTER_TOKEN}" --server="${K8S_CLUSTER_URL}" echo "OCP version: $(oc version)" export K8S_CLUSTER_ROUTER_BASE=$(oc get route console -n openshift-console -o=jsonpath='{.spec.host}' | sed 's/^[^.]*\.//') -} - - +} \ No newline at end of file