Skip to content

Commit ef66239

Browse files
[release-1.10] chore(e2e): create separate nightly job for translation tests (#4949)
* create separate nightly job for translation tests * Delete rhidp-13952-description.md --------- Co-authored-by: Sanket Saikia <sanketsaikia13@gmail.com>
1 parent 66cbc2e commit ef66239

12 files changed

Lines changed: 66 additions & 33 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
3+
# shellcheck source=.ci/pipelines/lib/log.sh
4+
source "$DIR"/lib/log.sh
5+
# shellcheck source=.ci/pipelines/lib/common.sh
6+
source "$DIR"/lib/common.sh
7+
# shellcheck source=.ci/pipelines/utils.sh
8+
source "$DIR"/utils.sh
9+
# shellcheck source=.ci/pipelines/lib/testing.sh
10+
source "$DIR"/lib/testing.sh
11+
# shellcheck source=.ci/pipelines/playwright-projects.sh
12+
source "$DIR"/playwright-projects.sh
13+
14+
handle_ocp_localization() {
15+
export NAME_SPACE="${NAME_SPACE:-showcase-localization-nightly}"
16+
17+
common::oc_login
18+
19+
K8S_CLUSTER_ROUTER_BASE=$(oc get route console -n openshift-console -o=jsonpath='{.spec.host}' | sed 's/^[^.]*\.//')
20+
export K8S_CLUSTER_ROUTER_BASE
21+
22+
cluster_setup_ocp_helm
23+
base_deployment "${PW_PROJECT_SHOWCASE}"
24+
deploy_test_backstage_customization_provider "${NAME_SPACE}"
25+
26+
run_localization_tests
27+
}
28+
29+
run_localization_tests() {
30+
local url="https://${RELEASE_NAME}-developer-hub-${NAME_SPACE}.${K8S_CLUSTER_ROUTER_BASE}"
31+
local locales=("DE" "ES" "FR" "IT" "JA")
32+
33+
log::section "Running localization tests"
34+
for locale in "${locales[@]}"; do
35+
local project_var="PW_PROJECT_SHOWCASE_LOCALIZATION_${locale}"
36+
local project="${!project_var}"
37+
log::info "Running localization test for ${locale} (project: ${project})"
38+
testing::check_and_test "${RELEASE_NAME}" "${NAME_SPACE}" "${project}" "${url}" "" "" "${project}"
39+
done
40+
}

.ci/pipelines/jobs/ocp-nightly.sh

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,6 @@ handle_ocp_nightly() {
3737
run_standard_deployment_tests
3838
run_runtime_config_change_tests
3939
run_sanity_plugins_check
40-
41-
# Skip localization tests for OSD-GCP jobs
42-
if [[ "${JOB_NAME}" != *osd-gcp* ]]; then
43-
run_localization_tests
44-
fi
45-
4640
}
4741

4842
run_standard_deployment_tests() {
@@ -90,17 +84,3 @@ run_sanity_plugins_check() {
9084
initiate_sanity_plugin_checks_deployment "${RELEASE_NAME}" "${NAME_SPACE_SANITY_PLUGINS_CHECK}" "${sanity_plugins_url}" "${PW_PROJECT_SHOWCASE_SANITY_PLUGINS}"
9185
testing::check_and_test "${RELEASE_NAME}" "${NAME_SPACE_SANITY_PLUGINS_CHECK}" "${PW_PROJECT_SHOWCASE_SANITY_PLUGINS}" "${sanity_plugins_url}"
9286
}
93-
94-
run_localization_tests() {
95-
local url="https://${RELEASE_NAME}-developer-hub-${NAME_SPACE}.${K8S_CLUSTER_ROUTER_BASE}"
96-
local locales=("DE" "ES" "FR" "IT" "JA")
97-
98-
log::section "Running localization tests"
99-
# Loop through all locales - uses project name as artifacts_subdir to avoid overwriting test artifacts
100-
for locale in "${locales[@]}"; do
101-
local project_var="PW_PROJECT_SHOWCASE_LOCALIZATION_${locale}"
102-
local project="${!project_var}"
103-
log::info "Running localization test for ${locale} (project: ${project})"
104-
testing::check_and_test "${RELEASE_NAME}" "${NAME_SPACE}" "${project}" "${url}" "" "" "${project}"
105-
done
106-
}

.ci/pipelines/openshift-ci-tests.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,13 @@ main() {
121121
log::info "Calling helm upgrade"
122122
handle_ocp_helm_upgrade
123123
;;
124+
*ocp*helm*localization*nightly*)
125+
log::info "Sourcing ocp-localization.sh"
126+
# shellcheck source=.ci/pipelines/jobs/ocp-localization.sh
127+
source "${DIR}/jobs/ocp-localization.sh"
128+
log::info "Calling handle_ocp_localization"
129+
handle_ocp_localization
130+
;;
124131
*ocp*helm*nightly*)
125132
log::info "Sourcing ocp-nightly.sh"
126133
# shellcheck source=.ci/pipelines/jobs/ocp-nightly.sh

.claude/rules/ci-e2e-testing.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ test.beforeAll(async ({ }, testInfo) => {
119119
7. **Localization Tests** (`playwright/e2e/localization/`)
120120
- Verify UI displays correctly translated strings
121121
- Supports **German (de)**, **Spanish (es)**, **French (fr)**, **Italian (it)**, and **Japanese (ja)**
122-
- Runs as part of OCP nightly job (skipped for OSD-GCP)
122+
- Runs in a dedicated `e2e-ocp-helm-localization-nightly` nightly job
123123
- Uses `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` Playwright projects
124124
- Translation files located in `translations/` directory
125125
- 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/`:
339339
- `handle_eks_helm` / `handle_eks_operator`: EKS Helm/Operator deployment
340340
- `handle_gke_helm` / `handle_gke_operator`: GKE Helm/Operator deployment
341341
- `handle_ocp_nightly`: OCP Helm nightly tests (also handles OSD-GCP Helm)
342+
- `handle_ocp_localization`: OCP Helm localization nightly tests
342343
- `handle_ocp_operator`: OCP Operator nightly tests (also handles OSD-GCP Operator)
343344
- `handle_ocp_pull`: OCP PR checks
344345
- `handle_auth_providers`: Auth provider tests

.claude/rules/e2e-fix-workflow.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ BRANCH=$(echo "$JOB_NAME" | grep -oE '\-rhdh-(main|release-[0-9]+\.[0-9]+)-' | s
4646

4747
| Job pattern | Projects |
4848
|-------------|----------|
49-
| `*ocp*helm*nightly*` (not upgrade) | `showcase`, `showcase-rbac`, `showcase-runtime`, `showcase-sanity-plugins`, `showcase-localization-*` |
49+
| `*ocp*helm*nightly*` (not upgrade, not localization) | `showcase`, `showcase-rbac`, `showcase-runtime`, `showcase-sanity-plugins` |
50+
| `*ocp*helm*localization*nightly*` | `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` |
5051
| `*ocp*helm*upgrade*` | `showcase-upgrade` |
5152
| `*ocp*operator*nightly*` (not auth) | `showcase-operator`, `showcase-operator-rbac` |
5253
| `*ocp*operator*auth-providers*` | `showcase-auth-providers` |

.cursor/rules/ci-e2e-testing.mdc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ test.beforeAll(async ({ }, testInfo) => {
122122
7. **Localization Tests** (`playwright/e2e/localization/`)
123123
- Verify UI displays correctly translated strings
124124
- Supports **German (de)**, **Spanish (es)**, **French (fr)**, **Italian (it)**, and **Japanese (ja)**
125-
- Runs as part of OCP nightly job (skipped for OSD-GCP)
125+
- Runs in a dedicated `e2e-ocp-helm-localization-nightly` nightly job
126126
- Uses `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` Playwright projects
127127
- Translation files located in `translations/` directory
128128
- 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/`:
342342
- `handle_eks_helm` / `handle_eks_operator`: EKS Helm/Operator deployment
343343
- `handle_gke_helm` / `handle_gke_operator`: GKE Helm/Operator deployment
344344
- `handle_ocp_nightly`: OCP Helm nightly tests (also handles OSD-GCP Helm)
345+
- `handle_ocp_localization`: OCP Helm localization nightly tests
345346
- `handle_ocp_operator`: OCP Operator nightly tests (also handles OSD-GCP Operator)
346347
- `handle_ocp_pull`: OCP PR checks
347348
- `handle_auth_providers`: Auth provider tests

.cursor/rules/e2e-fix-workflow.mdc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ BRANCH=$(echo "$JOB_NAME" | grep -oE '\-rhdh-(main|release-[0-9]+\.[0-9]+)-' | s
4949

5050
| Job pattern | Projects |
5151
|-------------|----------|
52-
| `*ocp*helm*nightly*` (not upgrade) | `showcase`, `showcase-rbac`, `showcase-runtime`, `showcase-sanity-plugins`, `showcase-localization-*` |
52+
| `*ocp*helm*nightly*` (not upgrade, not localization) | `showcase`, `showcase-rbac`, `showcase-runtime`, `showcase-sanity-plugins` |
53+
| `*ocp*helm*localization*nightly*` | `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` |
5354
| `*ocp*helm*upgrade*` | `showcase-upgrade` |
5455
| `*ocp*operator*nightly*` (not auth) | `showcase-operator`, `showcase-operator-rbac` |
5556
| `*ocp*operator*auth-providers*` | `showcase-auth-providers` |

.opencode/memories/ci-e2e-testing.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ test.beforeAll(async ({ }, testInfo) => {
119119
7. **Localization Tests** (`playwright/e2e/localization/`)
120120
- Verify UI displays correctly translated strings
121121
- Supports **German (de)**, **Spanish (es)**, **French (fr)**, **Italian (it)**, and **Japanese (ja)**
122-
- Runs as part of OCP nightly job (skipped for OSD-GCP)
122+
- Runs in a dedicated `e2e-ocp-helm-localization-nightly` nightly job
123123
- Uses `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` Playwright projects
124124
- Translation files located in `translations/` directory
125125
- 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/`:
339339
- `handle_eks_helm` / `handle_eks_operator`: EKS Helm/Operator deployment
340340
- `handle_gke_helm` / `handle_gke_operator`: GKE Helm/Operator deployment
341341
- `handle_ocp_nightly`: OCP Helm nightly tests (also handles OSD-GCP Helm)
342+
- `handle_ocp_localization`: OCP Helm localization nightly tests
342343
- `handle_ocp_operator`: OCP Operator nightly tests (also handles OSD-GCP Operator)
343344
- `handle_ocp_pull`: OCP PR checks
344345
- `handle_auth_providers`: Auth provider tests

.opencode/memories/e2e-fix-workflow.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ BRANCH=$(echo "$JOB_NAME" | grep -oE '\-rhdh-(main|release-[0-9]+\.[0-9]+)-' | s
4646

4747
| Job pattern | Projects |
4848
|-------------|----------|
49-
| `*ocp*helm*nightly*` (not upgrade) | `showcase`, `showcase-rbac`, `showcase-runtime`, `showcase-sanity-plugins`, `showcase-localization-*` |
49+
| `*ocp*helm*nightly*` (not upgrade, not localization) | `showcase`, `showcase-rbac`, `showcase-runtime`, `showcase-sanity-plugins` |
50+
| `*ocp*helm*localization*nightly*` | `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` |
5051
| `*ocp*helm*upgrade*` | `showcase-upgrade` |
5152
| `*ocp*operator*nightly*` (not auth) | `showcase-operator`, `showcase-operator-rbac` |
5253
| `*ocp*operator*auth-providers*` | `showcase-auth-providers` |

.rulesync/rules/ci-e2e-testing.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ test.beforeAll(async ({ }, testInfo) => {
125125
7. **Localization Tests** (`playwright/e2e/localization/`)
126126
- Verify UI displays correctly translated strings
127127
- Supports **German (de)**, **Spanish (es)**, **French (fr)**, **Italian (it)**, and **Japanese (ja)**
128-
- Runs as part of OCP nightly job (skipped for OSD-GCP)
128+
- Runs in a dedicated `e2e-ocp-helm-localization-nightly` nightly job
129129
- Uses `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` Playwright projects
130130
- Translation files located in `translations/` directory
131131
- 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/`:
345345
- `handle_eks_helm` / `handle_eks_operator`: EKS Helm/Operator deployment
346346
- `handle_gke_helm` / `handle_gke_operator`: GKE Helm/Operator deployment
347347
- `handle_ocp_nightly`: OCP Helm nightly tests (also handles OSD-GCP Helm)
348+
- `handle_ocp_localization`: OCP Helm localization nightly tests
348349
- `handle_ocp_operator`: OCP Operator nightly tests (also handles OSD-GCP Operator)
349350
- `handle_ocp_pull`: OCP PR checks
350351
- `handle_auth_providers`: Auth provider tests

0 commit comments

Comments
 (0)