Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): fix sensitive logging and deployment checks #2101

Merged
merged 15 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .ibm/pipelines/cluster/aks/deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ initiate_aks_deployment() {
# install_tekton_pipelines
uninstall_helmchart "${NAME_SPACE_K8S}" "${RELEASE_NAME}"
cd "${DIR}"
apply_yaml_files "${DIR}" "${NAME_SPACE_K8S}"
local rhdh_base_url="https://${K8S_CLUSTER_ROUTER_BASE}"
apply_yaml_files "${DIR}" "${NAME_SPACE_K8S}" "${rhdh_base_url}"
yq_merge_value_files "${DIR}/value_files/${HELM_CHART_VALUE_FILE_NAME}" "${DIR}/value_files/${HELM_CHART_AKS_DIFF_VALUE_FILE_NAME}" "/tmp/${HELM_CHART_K8S_MERGED_VALUE_FILE_NAME}"
mkdir -p "${ARTIFACT_DIR}/${NAME_SPACE_K8S}"
cp -a "/tmp/${HELM_CHART_K8S_MERGED_VALUE_FILE_NAME}" "${ARTIFACT_DIR}/${NAME_SPACE_K8S}/" # Save the final value-file into the artifacts directory.
Expand All @@ -26,7 +27,8 @@ initiate_rbac_aks_deployment() {
# install_tekton_pipelines
uninstall_helmchart "${NAME_SPACE_RBAC_K8S}" "${RELEASE_NAME_RBAC}"
cd "${DIR}"
apply_yaml_files "${DIR}" "${NAME_SPACE_RBAC_K8S}"
local rbac_rhdh_base_url="https://${K8S_CLUSTER_ROUTER_BASE}"
apply_yaml_files "${DIR}" "${NAME_SPACE_RBAC_K8S}" "${rbac_rhdh_base_url}"
yq_merge_value_files "${DIR}/value_files/${HELM_CHART_RBAC_VALUE_FILE_NAME}" "${DIR}/value_files/${HELM_CHART_RBAC_AKS_DIFF_VALUE_FILE_NAME}" "/tmp/${HELM_CHART_RBAC_K8S_MERGED_VALUE_FILE_NAME}"
mkdir -p "${ARTIFACT_DIR}/${NAME_SPACE_RBAC_K8S}"
cp -a "/tmp/${HELM_CHART_RBAC_K8S_MERGED_VALUE_FILE_NAME}" "${ARTIFACT_DIR}/${NAME_SPACE_RBAC_K8S}/" # Save the final value-file into the artifacts directory.
Expand Down
6 changes: 4 additions & 2 deletions .ibm/pipelines/cluster/gke/deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ initiate_gke_deployment() {
# install_tekton_pipelines
uninstall_helmchart "${NAME_SPACE_K8S}" "${RELEASE_NAME}"
cd "${DIR}"
apply_yaml_files "${DIR}" "${NAME_SPACE_K8S}"
local rhdh_base_url="https://${K8S_CLUSTER_ROUTER_BASE}"
apply_yaml_files "${DIR}" "${NAME_SPACE_K8S}" "${rhdh_base_url}"
oc apply -f "${DIR}/cluster/gke/frontend-config.yaml" --namespace="${project}"
yq_merge_value_files "${DIR}/value_files/${HELM_CHART_VALUE_FILE_NAME}" "${DIR}/value_files/${HELM_CHART_GKE_DIFF_VALUE_FILE_NAME}" "/tmp/${HELM_CHART_K8S_MERGED_VALUE_FILE_NAME}"
mkdir -p "${ARTIFACT_DIR}/${NAME_SPACE_K8S}"
Expand All @@ -30,7 +31,8 @@ initiate_rbac_gke_deployment() {
# install_tekton_pipelines
uninstall_helmchart "${NAME_SPACE_RBAC_K8S}" "${RELEASE_NAME_RBAC}"
cd "${DIR}"
apply_yaml_files "${DIR}" "${NAME_SPACE_RBAC_K8S}"
local rbac_rhdh_base_url="https://${K8S_CLUSTER_ROUTER_BASE}"
apply_yaml_files "${DIR}" "${NAME_SPACE_RBAC_K8S}" "${rbac_rhdh_base_url}"
yq_merge_value_files "${DIR}/value_files/${HELM_CHART_RBAC_VALUE_FILE_NAME}" "${DIR}/value_files/${HELM_CHART_RBAC_GKE_DIFF_VALUE_FILE_NAME}" "/tmp/${HELM_CHART_RBAC_K8S_MERGED_VALUE_FILE_NAME}"
mkdir -p "${ARTIFACT_DIR}/${NAME_SPACE_RBAC_K8S}"
cp -a "/tmp/${HELM_CHART_RBAC_K8S_MERGED_VALUE_FILE_NAME}" "${ARTIFACT_DIR}/${NAME_SPACE_RBAC_K8S}/" # Save the final value-file into the artifacts directory.
Expand Down
16 changes: 4 additions & 12 deletions .ibm/pipelines/env_variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,10 @@ NAME_SPACE_RUNTIME="${NAME_SPACE_RUNTIME:-showcase-runtime}"
NAME_SPACE_POSTGRES_DB="${NAME_SPACE_POSTGRES_DB:-postgress-external-db}"
NAME_SPACE_RDS="showcase-rds-nightly"
CHART_VERSION="2.15.2"
GITHUB_APP_APP_ID=$(cat /tmp/secrets/GITHUB_APP_APP_ID)
GITHUB_APP_CLIENT_ID=$(cat /tmp/secrets/GITHUB_APP_CLIENT_ID)
GITHUB_APP_PRIVATE_KEY=$(cat /tmp/secrets/GITHUB_APP_PRIVATE_KEY)
GITHUB_APP_CLIENT_SECRET=$(cat /tmp/secrets/GITHUB_APP_CLIENT_SECRET)
GITHUB_APP_2_APP_ID=$(cat /tmp/secrets/GITHUB_APP_2_APP_ID)
GITHUB_APP_2_CLIENT_ID=$(cat /tmp/secrets/GITHUB_APP_2_CLIENT_ID)
GITHUB_APP_2_PRIVATE_KEY=$(cat /tmp/secrets/GITHUB_APP_2_PRIVATE_KEY)
GITHUB_APP_2_CLIENT_SECRET=$(cat /tmp/secrets/GITHUB_APP_2_CLIENT_SECRET)
GITHUB_APP_3_APP_ID=$(cat /tmp/secrets/GITHUB_APP_3_APP_ID)
GITHUB_APP_3_CLIENT_ID=$(cat /tmp/secrets/GITHUB_APP_3_CLIENT_ID)
GITHUB_APP_3_PRIVATE_KEY=$(cat /tmp/secrets/GITHUB_APP_3_PRIVATE_KEY)
GITHUB_APP_3_CLIENT_SECRET=$(cat /tmp/secrets/GITHUB_APP_3_CLIENT_SECRET)
GITHUB_APP_APP_ID=$(cat /tmp/secrets/GITHUB_APP_3_APP_ID)
GITHUB_APP_CLIENT_ID=$(cat /tmp/secrets/GITHUB_APP_3_CLIENT_ID)
GITHUB_APP_PRIVATE_KEY=$(cat /tmp/secrets/GITHUB_APP_3_PRIVATE_KEY)
GITHUB_APP_CLIENT_SECRET=$(cat /tmp/secrets/GITHUB_APP_3_CLIENT_SECRET)
GITHUB_APP_JANUS_TEST_APP_ID=OTE3NjM5
GITHUB_APP_JANUS_TEST_CLIENT_ID=SXYyM2xpSEdtU1l6SUFEbHFIakw=
GITHUB_APP_JANUS_TEST_PRIVATE_KEY=$(cat /tmp/secrets/GITHUB_APP_JANUS_TEST_PRIVATE_KEY)
Expand Down
5 changes: 2 additions & 3 deletions .ibm/pipelines/jobs/aks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ 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}"

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}"
local rbac_rhdh_base_url="https://${K8S_CLUSTER_ROUTER_BASE}"
check_and_test "${RELEASE_NAME_RBAC}" "${NAME_SPACE_RBAC_K8S}" "${rbac_rhdh_base_url}"
delete_namespace "${NAME_SPACE_RBAC_K8S}"
}

Expand Down
5 changes: 2 additions & 3 deletions .ibm/pipelines/jobs/gke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ handle_gke() {
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}"

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}"
local rbac_rhdh_base_url="https://${K8S_CLUSTER_ROUTER_BASE}"
check_and_test "${RELEASE_NAME_RBAC}" "${NAME_SPACE_RBAC_K8S}" "${rbac_rhdh_base_url}"
delete_namespace "${NAME_SPACE_RBAC_K8S}"

}
5 changes: 3 additions & 2 deletions .ibm/pipelines/jobs/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ handle_main() {
echo "OCP version: $(oc version)"

export K8S_CLUSTER_ROUTER_BASE=$(oc get route console -n openshift-console -o=jsonpath='{.spec.host}' | sed 's/^[^.]*\.//')
local url="https://${RELEASE_NAME}-backstage-${NAME_SPACE}.${K8S_CLUSTER_ROUTER_BASE}"
cluster_setup
initiate_deployments
deploy_test_backstage_provider "${NAME_SPACE}"
local url="https://${RELEASE_NAME}-backstage-${NAME_SPACE}.${K8S_CLUSTER_ROUTER_BASE}"
check_and_test "${RELEASE_NAME}" "${NAME_SPACE}" "${url}"
check_and_test "${RELEASE_NAME_RBAC}" "${NAME_SPACE_RBAC}" "${url}"
local rbac_url="https://${RELEASE_NAME_RBAC}-backstage-${NAME_SPACE_RBAC}.${K8S_CLUSTER_ROUTER_BASE}"
check_and_test "${RELEASE_NAME_RBAC}" "${NAME_SPACE_RBAC}" "${rbac_url}"
}
21 changes: 10 additions & 11 deletions .ibm/pipelines/jobs/periodic.sh
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
#!/bin/sh

handle_nightly() {
export NAME_SPACE="showcase-ci-nightly"
export NAME_SPACE_RBAC="showcase-rbac-nightly"
export NAME_SPACE_POSTGRES_DB="postgress-external-db-nightly"
export NAME_SPACE_K8S="showcase-k8s-ci-nightly"
export NAME_SPACE_RBAC_K8S="showcase-rbac-k8s-ci-nightly"

oc_login

export K8S_CLUSTER_ROUTER_BASE=$(oc get route console -n openshift-console -o=jsonpath='{.spec.host}' | sed 's/^[^.]*\.//')

configure_namespace "${NAME_SPACE}"
deploy_test_backstage_provider "${NAME_SPACE}"
local url="https://${RELEASE_NAME}-backstage-${NAME_SPACE}.${K8S_CLUSTER_ROUTER_BASE}"
cluster_setup
initiate_deployments
local url="https://${RELEASE_NAME}-backstage-${NAME_SPACE}.${K8S_CLUSTER_ROUTER_BASE}"
check_and_test "${RELEASE_NAME}" "${NAME_SPACE}" "${url}"
check_and_test "${RELEASE_NAME_RBAC}" "${NAME_SPACE_RBAC}" "${url}"
local rbac_url="https://${RELEASE_NAME_RBAC}-backstage-${NAME_SPACE_RBAC}.${K8S_CLUSTER_ROUTER_BASE}"
check_and_test "${RELEASE_NAME_RBAC}" "${NAME_SPACE_RBAC}" "${rbac_url}"

# Only test TLS config with RDS and Change configuration at runtime in nightly jobs
initiate_rds_deployment "${RELEASE_NAME}" "${NAME_SPACE_RDS}"
check_and_test "${RELEASE_NAME}" "${NAME_SPACE_RDS}" "${url}"
local rds_url="https://${RELEASE_NAME}-backstage-${NAME_SPACE_RDS}.${K8S_CLUSTER_ROUTER_BASE}"
check_and_test "${RELEASE_NAME}" "${NAME_SPACE_RDS}" "${rds_url}"

# Deploy `showcase-runtime` to run tests that require configuration changes at runtime
configure_namespace "${NAME_SPACE_RUNTIME}"
uninstall_helmchart "${NAME_SPACE_RUNTIME}" "${RELEASE_NAME}"
oc apply -f "$DIR/resources/redis-cache/redis-deployment.yaml" --namespace="${NAME_SPACE_RUNTIME}"
apply_yaml_files "${DIR}" "${NAME_SPACE_RUNTIME}" "${RELEASE_NAME}"

local runtime_url="https://${RELEASE_NAME}-backstage-${NAME_SPACE_RUNTIME}.${K8S_CLUSTER_ROUTER_BASE}"

apply_yaml_files "${DIR}" "${NAME_SPACE_RUNTIME}" "${runtime_url}"
helm upgrade -i "${RELEASE_NAME}" -n "${NAME_SPACE_RUNTIME}" "${HELM_REPO_NAME}/${HELM_IMAGE_NAME}" --version "${CHART_VERSION}" -f "${DIR}/value_files/${HELM_CHART_VALUE_FILE_NAME}" --set global.clusterRouterBase="${K8S_CLUSTER_ROUTER_BASE}" --set upstream.backstage.image.repository="${QUAY_REPO}" --set upstream.backstage.image.tag="${TAG_NAME}"
check_and_test "${RELEASE_NAME}" "${NAME_SPACE_RUNTIME}" "${url}"
check_and_test "${RELEASE_NAME}" "${NAME_SPACE_RUNTIME}" "${runtime_url}"
}
2 changes: 2 additions & 0 deletions .ibm/pipelines/ocp-cluster-claim-login.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ if [[ "$open_console" == "y" || "$open_console" == "Y" ]]; then
echo "Use bellow user and password to login into web console:"
echo "Username: kubeadmin"
echo "Password: $password"
echo "Password copied to clipboard"
echo $password | pbcopy
sleep 3

# Attempt to open the web console in the default browser
Expand Down
4 changes: 1 addition & 3 deletions .ibm/pipelines/openshift-ci-tests.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#!/bin/sh

set -xe
set -e
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"
OVERALL_RESULT=0

cleanup() {
Expand Down Expand Up @@ -61,7 +60,6 @@ main() {
;;
esac

echo "K8S_CLUSTER_ROUTER_BASE : $K8S_CLUSTER_ROUTER_BASE"
echo "Main script completed with result: ${OVERALL_RESULT}"
exit "${OVERALL_RESULT}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,6 @@ subjects:
- kind: ServiceAccount
name: rhdh-k8s-plugin
namespace: showcase
- kind: ServiceAccount
name: rhdh-k8s-plugin
namespace: showcase-rbac
- kind: ServiceAccount
name: rhdh-k8s-plugin
namespace: showcase-ci-nightly
- kind: ServiceAccount
name: rhdh-k8s-plugin
namespace: showcase-rbac-nightly
- kind: ServiceAccount
name: rhdh-k8s-plugin
namespace: showcase-1-2-x
- kind: ServiceAccount
name: rhdh-k8s-plugin
namespace: showcase-rbac-1-2-x
- kind: ServiceAccount
name: rhdh-k8s-plugin
namespace: showcase-1-3-x
- kind: ServiceAccount
name: rhdh-k8s-plugin
namespace: showcase-rbac-1-3-x
- kind: ServiceAccount
name: rhdh-k8s-plugin
namespace: showcase-pr-1
- kind: ServiceAccount
name: rhdh-k8s-plugin
namespace: showcase-pr-2
- kind: ServiceAccount
name: rhdh-k8s-plugin
namespace: showcase-pr-3

34 changes: 10 additions & 24 deletions .ibm/pipelines/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ retrieve_pod_logs() {
save_all_pod_logs(){
set +e
local namespace=$1
namespace=${namespace%-pr-*} # remove -pr- suffix if any.
mkdir -p pod_logs
rm -rf pod_logs && mkdir -p pod_logs

# Get all pod names in the namespace
pod_names=$(kubectl get pods -n $namespace -o jsonpath='{.items[*].metadata.name}')
Expand Down Expand Up @@ -384,23 +383,10 @@ configure_external_postgres_db() {
oc apply -f "${DIR}/resources/postgres-db/postgres-cred.yaml" --namespace="${project}"
}

set_github_app_3_credentials() {
GITHUB_APP_APP_ID=$GITHUB_APP_3_APP_ID
GITHUB_APP_CLIENT_ID=$GITHUB_APP_3_CLIENT_ID
GITHUB_APP_PRIVATE_KEY=$GITHUB_APP_3_PRIVATE_KEY
GITHUB_APP_CLIENT_SECRET=$GITHUB_APP_3_CLIENT_SECRET

export GITHUB_APP_APP_ID
export GITHUB_APP_CLIENT_ID
export GITHUB_APP_PRIVATE_KEY
export GITHUB_APP_CLIENT_SECRET
echo "GitHub App 3 credentials set for current job."
}

apply_yaml_files() {
local dir=$1
local project=$2
local release_name=$3
local rhdh_base_url=$3
echo "Applying YAML files to namespace ${project}"

oc config set-context --current --namespace="${project}"
Expand All @@ -418,10 +404,8 @@ apply_yaml_files() {
done

DH_TARGET_URL=$(echo -n "test-backstage-customization-provider-${project}.${K8S_CLUSTER_ROUTER_BASE}" | base64 -w 0)
local RHDH_BASE_URL=$(echo -n "https://${release_name}-backstage-${project}.${K8S_CLUSTER_ROUTER_BASE}" | base64 | tr -d '\n')
if [[ "$JOB_NAME" == *aks* || "$JOB_NAME" == *gke* ]]; then
RHDH_BASE_URL=$(echo -n "https://${K8S_CLUSTER_ROUTER_BASE}" | base64 | tr -d '\n')
fi
local RHDH_BASE_URL=$(echo -n "$rhdh_base_url" | base64 | tr -d '\n')

for key in GITHUB_APP_APP_ID GITHUB_APP_CLIENT_ID GITHUB_APP_PRIVATE_KEY GITHUB_APP_CLIENT_SECRET GITHUB_APP_JANUS_TEST_APP_ID GITHUB_APP_JANUS_TEST_CLIENT_ID GITHUB_APP_JANUS_TEST_CLIENT_SECRET GITHUB_APP_JANUS_TEST_PRIVATE_KEY GITHUB_APP_WEBHOOK_URL GITHUB_APP_WEBHOOK_SECRET KEYCLOAK_CLIENT_SECRET ACR_SECRET GOOGLE_CLIENT_ID GOOGLE_CLIENT_SECRET K8S_CLUSTER_TOKEN_ENCODED OCM_CLUSTER_URL GITLAB_TOKEN KEYCLOAK_AUTH_BASE_URL KEYCLOAK_AUTH_CLIENTID KEYCLOAK_AUTH_CLIENT_SECRET KEYCLOAK_AUTH_LOGIN_REALM KEYCLOAK_AUTH_REALM RHDH_BASE_URL; do
sed -i "s|${key}:.*|${key}: ${!key}|g" "$dir/auth/secrets-rhdh-secrets.yaml"
done
Expand All @@ -439,7 +423,7 @@ apply_yaml_files() {

sed -i "s/K8S_CLUSTER_NAME:.*/K8S_CLUSTER_NAME: ${ENCODED_CLUSTER_NAME}/g" "$dir/auth/secrets-rhdh-secrets.yaml"

token=$(oc get secret "${secret_name}" -n "${project}" -o=jsonpath='{.data.token}')
token=$(oc get secret rhdh-k8s-plugin-secret -n "${project}" -o=jsonpath='{.data.token}')
sed -i "s/OCM_CLUSTER_TOKEN: .*/OCM_CLUSTER_TOKEN: ${token}/" "$dir/auth/secrets-rhdh-secrets.yaml"

# Select the configuration file based on the namespace or job
Expand Down Expand Up @@ -519,7 +503,7 @@ create_app_config_map_k8s() {
run_tests() {
local release_name=$1
local project=$2
project=${project%-pr-*} # Remove -pr- suffix if any set for main branchs pr's.
project=${project}
cd "${DIR}/../../e2e-tests"
yarn install
yarn playwright install chromium
Expand Down Expand Up @@ -656,7 +640,8 @@ initiate_deployments() {
oc apply -f "$DIR/resources/redis-cache/redis-deployment.yaml" --namespace="${NAME_SPACE}"

cd "${DIR}"
apply_yaml_files "${DIR}" "${NAME_SPACE}" "${RELEASE_NAME}" "${RELEASE_NAME}"
local rhdh_base_url="https://${RELEASE_NAME}-backstage-${NAME_SPACE}.${K8S_CLUSTER_ROUTER_BASE}"
apply_yaml_files "${DIR}" "${NAME_SPACE}" "${rhdh_base_url}"
echo "Deploying image from repository: ${QUAY_REPO}, TAG_NAME: ${TAG_NAME}, in NAME_SPACE: ${NAME_SPACE}"
helm upgrade -i "${RELEASE_NAME}" -n "${NAME_SPACE}" "${HELM_REPO_NAME}/${HELM_IMAGE_NAME}" --version "${CHART_VERSION}" -f "${DIR}/value_files/${HELM_CHART_VALUE_FILE_NAME}" --set global.clusterRouterBase="${K8S_CLUSTER_ROUTER_BASE}" --set upstream.backstage.image.repository="${QUAY_REPO}" --set upstream.backstage.image.tag="${TAG_NAME}"

Expand All @@ -665,7 +650,8 @@ initiate_deployments() {
configure_external_postgres_db "${NAME_SPACE_RBAC}"

# Initiate rbac instace deployment.
apply_yaml_files "${DIR}" "${NAME_SPACE_RBAC}" "${RELEASE_NAME_RBAC}"
local rbac_rhdh_base_url="https://${RELEASE_NAME_RBAC}-backstage-${NAME_SPACE_RBAC}.${K8S_CLUSTER_ROUTER_BASE}"
apply_yaml_files "${DIR}" "${NAME_SPACE_RBAC}" "${rbac_rhdh_base_url}"
echo "Deploying image from repository: ${QUAY_REPO}, TAG_NAME: ${TAG_NAME}, in NAME_SPACE: ${RELEASE_NAME_RBAC}"
helm upgrade -i "${RELEASE_NAME_RBAC}" -n "${NAME_SPACE_RBAC}" "${HELM_REPO_NAME}/${HELM_IMAGE_NAME}" --version "${CHART_VERSION}" -f "${DIR}/value_files/${HELM_CHART_RBAC_VALUE_FILE_NAME}" --set global.clusterRouterBase="${K8S_CLUSTER_ROUTER_BASE}" --set upstream.backstage.image.repository="${QUAY_REPO}" --set upstream.backstage.image.tag="${TAG_NAME}"
}
Expand Down
2 changes: 0 additions & 2 deletions e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"scripts": {
"showcase": "playwright test --project=showcase",
"showcase-rbac": "playwright test --project=showcase-rbac",
"showcase-1-2-x": "playwright test --project=showcase",
"showcase-rbac-1-2-x": "playwright test --project=showcase-rbac",
"showcase-ci-nightly": "playwright test --project=showcase",
"showcase-rbac-nightly": "playwright test --project=showcase-rbac",
"showcase-k8s-ci-nightly": "playwright test --project=showcase-k8s",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ import { UIhelper } from "../utils/ui-helper";
import { Common } from "../utils/common";

test.describe("Verify TLS configuration with external Postgres DB", () => {
test("Verify successful DB connection and display of expected entities in the Catalog", async ({
test("Verify successful DB connection and display of expected entities in the Home Page and Catalog", async ({
page,
}) => {
const uiHelper = new UIhelper(page);
const common = new Common(page);
await common.loginAsKeycloakUser();
await page.goto("/catalog");
await uiHelper.verifyHeading("Welcome back!");
await uiHelper.verifyText("Quick Access");
await page.getByLabel("Catalog").click();
await uiHelper.selectMuiBox("Kind", "Component");
await uiHelper.clickByDataTestId("user-picker-all");
await uiHelper.verifyRowsInTable(["Backstage Showcase"]);
await uiHelper.verifyRowsInTable(["test-rhdh-qe-2-team-owned"]);
});
});
Loading