Skip to content
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
40 changes: 40 additions & 0 deletions .ci/pipelines/jobs/ocp-localization.sh
Original file line number Diff line number Diff line change
@@ -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
}
20 changes: 0 additions & 20 deletions .ci/pipelines/jobs/ocp-nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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
}
7 changes: 7 additions & 0 deletions .ci/pipelines/openshift-ci-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .claude/rules/ci-e2e-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .claude/rules/e2e-fix-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down
3 changes: 2 additions & 1 deletion .cursor/rules/ci-e2e-testing.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .cursor/rules/e2e-fix-workflow.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down
3 changes: 2 additions & 1 deletion .opencode/memories/ci-e2e-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .opencode/memories/e2e-fix-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down
3 changes: 2 additions & 1 deletion .rulesync/rules/ci-e2e-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .rulesync/rules/e2e-fix-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down
8 changes: 3 additions & 5 deletions docs/e2e-tests/CI.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading