diff --git a/.ci/pipelines/jobs/ocp-localization.sh b/.ci/pipelines/jobs/ocp-localization.sh new file mode 100644 index 0000000000..0ac9b3d593 --- /dev/null +++ b/.ci/pipelines/jobs/ocp-localization.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +# shellcheck source=.ci/pipelines/lib/log.sh +source "$DIR"/lib/log.sh +# shellcheck source=.ci/pipelines/lib/common.sh +source "$DIR"/lib/common.sh +# shellcheck source=.ci/pipelines/utils.sh +source "$DIR"/utils.sh +# shellcheck source=.ci/pipelines/lib/testing.sh +source "$DIR"/lib/testing.sh +# shellcheck source=.ci/pipelines/playwright-projects.sh +source "$DIR"/playwright-projects.sh + +handle_ocp_localization() { + export NAME_SPACE="${NAME_SPACE:-showcase-localization-nightly}" + + common::oc_login + + K8S_CLUSTER_ROUTER_BASE=$(oc get route console -n openshift-console -o=jsonpath='{.spec.host}' | sed 's/^[^.]*\.//') + export K8S_CLUSTER_ROUTER_BASE + + cluster_setup_ocp_helm + base_deployment "${PW_PROJECT_SHOWCASE}" + deploy_test_backstage_customization_provider "${NAME_SPACE}" + + run_localization_tests +} + +run_localization_tests() { + local url="https://${RELEASE_NAME}-developer-hub-${NAME_SPACE}.${K8S_CLUSTER_ROUTER_BASE}" + local locales=("DE" "ES" "FR" "IT" "JA") + + log::section "Running localization tests" + for locale in "${locales[@]}"; do + local project_var="PW_PROJECT_SHOWCASE_LOCALIZATION_${locale}" + local project="${!project_var}" + log::info "Running localization test for ${locale} (project: ${project})" + testing::check_and_test "${RELEASE_NAME}" "${NAME_SPACE}" "${project}" "${url}" "" "" "${project}" + done +} diff --git a/.ci/pipelines/jobs/ocp-nightly.sh b/.ci/pipelines/jobs/ocp-nightly.sh index facb5c9c4c..4b3b23bf8b 100644 --- a/.ci/pipelines/jobs/ocp-nightly.sh +++ b/.ci/pipelines/jobs/ocp-nightly.sh @@ -38,12 +38,6 @@ handle_ocp_nightly() { run_standard_deployment_tests run_runtime_config_change_tests run_sanity_plugins_check - - # Skip localization tests for OSD-GCP jobs - if [[ "${JOB_NAME}" != *osd-gcp* ]]; then - run_localization_tests - fi - } run_standard_deployment_tests() { @@ -91,17 +85,3 @@ run_sanity_plugins_check() { initiate_sanity_plugin_checks_deployment "${RELEASE_NAME}" "${NAME_SPACE_SANITY_PLUGINS_CHECK}" "${sanity_plugins_url}" "${PW_PROJECT_SHOWCASE_SANITY_PLUGINS}" testing::check_and_test "${RELEASE_NAME}" "${NAME_SPACE_SANITY_PLUGINS_CHECK}" "${PW_PROJECT_SHOWCASE_SANITY_PLUGINS}" "${sanity_plugins_url}" } - -run_localization_tests() { - local url="https://${RELEASE_NAME}-developer-hub-${NAME_SPACE}.${K8S_CLUSTER_ROUTER_BASE}" - local locales=("DE" "ES" "FR" "IT" "JA") - - log::section "Running localization tests" - # Loop through all locales - uses project name as artifacts_subdir to avoid overwriting test artifacts - for locale in "${locales[@]}"; do - local project_var="PW_PROJECT_SHOWCASE_LOCALIZATION_${locale}" - local project="${!project_var}" - log::info "Running localization test for ${locale} (project: ${project})" - testing::check_and_test "${RELEASE_NAME}" "${NAME_SPACE}" "${project}" "${url}" "" "" "${project}" - done -} diff --git a/.ci/pipelines/openshift-ci-tests.sh b/.ci/pipelines/openshift-ci-tests.sh index e76b59c99d..55b3679cbc 100755 --- a/.ci/pipelines/openshift-ci-tests.sh +++ b/.ci/pipelines/openshift-ci-tests.sh @@ -121,6 +121,13 @@ main() { log::info "Calling helm upgrade" handle_ocp_helm_upgrade ;; + *ocp*helm*localization*nightly*) + log::info "Sourcing ocp-localization.sh" + # shellcheck source=.ci/pipelines/jobs/ocp-localization.sh + source "${DIR}/jobs/ocp-localization.sh" + log::info "Calling handle_ocp_localization" + handle_ocp_localization + ;; *ocp*helm*nightly*) log::info "Sourcing ocp-nightly.sh" # shellcheck source=.ci/pipelines/jobs/ocp-nightly.sh diff --git a/.claude/rules/ci-e2e-testing.md b/.claude/rules/ci-e2e-testing.md index cd7f12ed09..5af109fbbc 100644 --- a/.claude/rules/ci-e2e-testing.md +++ b/.claude/rules/ci-e2e-testing.md @@ -119,7 +119,7 @@ test.beforeAll(async ({ }, testInfo) => { 7. **Localization Tests** (`playwright/e2e/localization/`) - Verify UI displays correctly translated strings - Supports **German (de)**, **Spanish (es)**, **French (fr)**, **Italian (it)**, and **Japanese (ja)** - - Runs as part of OCP nightly job (skipped for OSD-GCP) + - Runs in a dedicated `e2e-ocp-helm-localization-nightly` nightly job - Uses `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` Playwright projects - Translation files located in `translations/` directory - Test helper: `e2e-tests/playwright/e2e/localization/locale.ts` @@ -339,6 +339,7 @@ The main script dispatches to job-specific handlers in `.ci/pipelines/jobs/`: - `handle_eks_helm` / `handle_eks_operator`: EKS Helm/Operator deployment - `handle_gke_helm` / `handle_gke_operator`: GKE Helm/Operator deployment - `handle_ocp_nightly`: OCP Helm nightly tests (also handles OSD-GCP Helm) +- `handle_ocp_localization`: OCP Helm localization nightly tests - `handle_ocp_operator`: OCP Operator nightly tests (also handles OSD-GCP Operator) - `handle_ocp_pull`: OCP PR checks - `handle_auth_providers`: Auth provider tests diff --git a/.claude/rules/e2e-fix-workflow.md b/.claude/rules/e2e-fix-workflow.md index 8d82a23c0c..f8b1c38d80 100644 --- a/.claude/rules/e2e-fix-workflow.md +++ b/.claude/rules/e2e-fix-workflow.md @@ -46,7 +46,8 @@ BRANCH=$(echo "$JOB_NAME" | grep -oE '\-rhdh-(main|release-[0-9]+\.[0-9]+)-' | s | Job pattern | Projects | |-------------|----------| -| `*ocp*helm*nightly*` (not upgrade) | `showcase`, `showcase-rbac`, `showcase-runtime`, `showcase-sanity-plugins`, `showcase-localization-*` | +| `*ocp*helm*nightly*` (not upgrade, not localization) | `showcase`, `showcase-rbac`, `showcase-runtime`, `showcase-sanity-plugins` | +| `*ocp*helm*localization*nightly*` | `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` | | `*ocp*helm*upgrade*` | `showcase-upgrade` | | `*ocp*operator*nightly*` (not auth) | `showcase-operator`, `showcase-operator-rbac` | | `*ocp*operator*auth-providers*` | `showcase-auth-providers` | diff --git a/.cursor/rules/ci-e2e-testing.mdc b/.cursor/rules/ci-e2e-testing.mdc index 1a9d38b139..448294f2be 100644 --- a/.cursor/rules/ci-e2e-testing.mdc +++ b/.cursor/rules/ci-e2e-testing.mdc @@ -122,7 +122,7 @@ test.beforeAll(async ({ }, testInfo) => { 7. **Localization Tests** (`playwright/e2e/localization/`) - Verify UI displays correctly translated strings - Supports **German (de)**, **Spanish (es)**, **French (fr)**, **Italian (it)**, and **Japanese (ja)** - - Runs as part of OCP nightly job (skipped for OSD-GCP) + - Runs in a dedicated `e2e-ocp-helm-localization-nightly` nightly job - Uses `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` Playwright projects - Translation files located in `translations/` directory - Test helper: `e2e-tests/playwright/e2e/localization/locale.ts` @@ -342,6 +342,7 @@ The main script dispatches to job-specific handlers in `.ci/pipelines/jobs/`: - `handle_eks_helm` / `handle_eks_operator`: EKS Helm/Operator deployment - `handle_gke_helm` / `handle_gke_operator`: GKE Helm/Operator deployment - `handle_ocp_nightly`: OCP Helm nightly tests (also handles OSD-GCP Helm) +- `handle_ocp_localization`: OCP Helm localization nightly tests - `handle_ocp_operator`: OCP Operator nightly tests (also handles OSD-GCP Operator) - `handle_ocp_pull`: OCP PR checks - `handle_auth_providers`: Auth provider tests diff --git a/.cursor/rules/e2e-fix-workflow.mdc b/.cursor/rules/e2e-fix-workflow.mdc index 6f078d4d82..b63e222a9d 100644 --- a/.cursor/rules/e2e-fix-workflow.mdc +++ b/.cursor/rules/e2e-fix-workflow.mdc @@ -49,7 +49,8 @@ BRANCH=$(echo "$JOB_NAME" | grep -oE '\-rhdh-(main|release-[0-9]+\.[0-9]+)-' | s | Job pattern | Projects | |-------------|----------| -| `*ocp*helm*nightly*` (not upgrade) | `showcase`, `showcase-rbac`, `showcase-runtime`, `showcase-sanity-plugins`, `showcase-localization-*` | +| `*ocp*helm*nightly*` (not upgrade, not localization) | `showcase`, `showcase-rbac`, `showcase-runtime`, `showcase-sanity-plugins` | +| `*ocp*helm*localization*nightly*` | `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` | | `*ocp*helm*upgrade*` | `showcase-upgrade` | | `*ocp*operator*nightly*` (not auth) | `showcase-operator`, `showcase-operator-rbac` | | `*ocp*operator*auth-providers*` | `showcase-auth-providers` | diff --git a/.opencode/memories/ci-e2e-testing.md b/.opencode/memories/ci-e2e-testing.md index cd7f12ed09..5af109fbbc 100644 --- a/.opencode/memories/ci-e2e-testing.md +++ b/.opencode/memories/ci-e2e-testing.md @@ -119,7 +119,7 @@ test.beforeAll(async ({ }, testInfo) => { 7. **Localization Tests** (`playwright/e2e/localization/`) - Verify UI displays correctly translated strings - Supports **German (de)**, **Spanish (es)**, **French (fr)**, **Italian (it)**, and **Japanese (ja)** - - Runs as part of OCP nightly job (skipped for OSD-GCP) + - Runs in a dedicated `e2e-ocp-helm-localization-nightly` nightly job - Uses `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` Playwright projects - Translation files located in `translations/` directory - Test helper: `e2e-tests/playwright/e2e/localization/locale.ts` @@ -339,6 +339,7 @@ The main script dispatches to job-specific handlers in `.ci/pipelines/jobs/`: - `handle_eks_helm` / `handle_eks_operator`: EKS Helm/Operator deployment - `handle_gke_helm` / `handle_gke_operator`: GKE Helm/Operator deployment - `handle_ocp_nightly`: OCP Helm nightly tests (also handles OSD-GCP Helm) +- `handle_ocp_localization`: OCP Helm localization nightly tests - `handle_ocp_operator`: OCP Operator nightly tests (also handles OSD-GCP Operator) - `handle_ocp_pull`: OCP PR checks - `handle_auth_providers`: Auth provider tests diff --git a/.opencode/memories/e2e-fix-workflow.md b/.opencode/memories/e2e-fix-workflow.md index 8d82a23c0c..f8b1c38d80 100644 --- a/.opencode/memories/e2e-fix-workflow.md +++ b/.opencode/memories/e2e-fix-workflow.md @@ -46,7 +46,8 @@ BRANCH=$(echo "$JOB_NAME" | grep -oE '\-rhdh-(main|release-[0-9]+\.[0-9]+)-' | s | Job pattern | Projects | |-------------|----------| -| `*ocp*helm*nightly*` (not upgrade) | `showcase`, `showcase-rbac`, `showcase-runtime`, `showcase-sanity-plugins`, `showcase-localization-*` | +| `*ocp*helm*nightly*` (not upgrade, not localization) | `showcase`, `showcase-rbac`, `showcase-runtime`, `showcase-sanity-plugins` | +| `*ocp*helm*localization*nightly*` | `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` | | `*ocp*helm*upgrade*` | `showcase-upgrade` | | `*ocp*operator*nightly*` (not auth) | `showcase-operator`, `showcase-operator-rbac` | | `*ocp*operator*auth-providers*` | `showcase-auth-providers` | diff --git a/.rulesync/rules/ci-e2e-testing.md b/.rulesync/rules/ci-e2e-testing.md index 8abbb4fdec..765f00b480 100644 --- a/.rulesync/rules/ci-e2e-testing.md +++ b/.rulesync/rules/ci-e2e-testing.md @@ -125,7 +125,7 @@ test.beforeAll(async ({ }, testInfo) => { 7. **Localization Tests** (`playwright/e2e/localization/`) - Verify UI displays correctly translated strings - Supports **German (de)**, **Spanish (es)**, **French (fr)**, **Italian (it)**, and **Japanese (ja)** - - Runs as part of OCP nightly job (skipped for OSD-GCP) + - Runs in a dedicated `e2e-ocp-helm-localization-nightly` nightly job - Uses `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` Playwright projects - Translation files located in `translations/` directory - Test helper: `e2e-tests/playwright/e2e/localization/locale.ts` @@ -345,6 +345,7 @@ The main script dispatches to job-specific handlers in `.ci/pipelines/jobs/`: - `handle_eks_helm` / `handle_eks_operator`: EKS Helm/Operator deployment - `handle_gke_helm` / `handle_gke_operator`: GKE Helm/Operator deployment - `handle_ocp_nightly`: OCP Helm nightly tests (also handles OSD-GCP Helm) +- `handle_ocp_localization`: OCP Helm localization nightly tests - `handle_ocp_operator`: OCP Operator nightly tests (also handles OSD-GCP Operator) - `handle_ocp_pull`: OCP PR checks - `handle_auth_providers`: Auth provider tests diff --git a/.rulesync/rules/e2e-fix-workflow.md b/.rulesync/rules/e2e-fix-workflow.md index f30b60b018..48dd5416a8 100644 --- a/.rulesync/rules/e2e-fix-workflow.md +++ b/.rulesync/rules/e2e-fix-workflow.md @@ -52,7 +52,8 @@ BRANCH=$(echo "$JOB_NAME" | grep -oE '\-rhdh-(main|release-[0-9]+\.[0-9]+)-' | s | Job pattern | Projects | |-------------|----------| -| `*ocp*helm*nightly*` (not upgrade) | `showcase`, `showcase-rbac`, `showcase-runtime`, `showcase-sanity-plugins`, `showcase-localization-*` | +| `*ocp*helm*nightly*` (not upgrade, not localization) | `showcase`, `showcase-rbac`, `showcase-runtime`, `showcase-sanity-plugins` | +| `*ocp*helm*localization*nightly*` | `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` | | `*ocp*helm*upgrade*` | `showcase-upgrade` | | `*ocp*operator*nightly*` (not auth) | `showcase-operator`, `showcase-operator-rbac` | | `*ocp*operator*auth-providers*` | `showcase-auth-providers` | diff --git a/docs/e2e-tests/CI.md b/docs/e2e-tests/CI.md index f0153e4e59..5b3ed60201 100644 --- a/docs/e2e-tests/CI.md +++ b/docs/e2e-tests/CI.md @@ -101,15 +101,13 @@ The nightly job for the `main` branch also runs against three OpenShift Containe ### Localization Tests -Localization tests verify that the RHDH UI displays correctly translated strings for supported languages. These tests run as part of the OCP Helm nightly job. +Localization tests verify that the RHDH UI displays correctly translated strings for supported languages. These tests run in a dedicated `e2e-ocp-helm-localization-nightly` nightly job. - **Supported Languages:** German (de), Spanish (es), French (fr), Italian (it), and Japanese (ja) -- **When They Run:** Localization tests run at the end of the OCP nightly job, after standard deployment tests, runtime config tests, and sanity plugin checks. -- **Skip Condition:** Localization tests are **skipped for OSD-GCP jobs** due to environment constraints. -- **Reuses Existing Deployment:** The tests run against the same RHDH instance deployed for standard tests, so no additional deployment is needed. +- **When They Run:** Localization tests run in their own nightly job with a dedicated showcase deployment. - **Playwright Projects:** `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` -The localization test implementation is in `.ci/pipelines/jobs/ocp-nightly.sh` (`run_localization_tests()` function). +The localization test implementation is in `.ci/pipelines/jobs/ocp-localization.sh` (`run_localization_tests()` function). ### CI Job Definitions