Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: ols-console-pre-commits
spec:
description: |
Runs OpenShift Lightspeed console e2e (Cypress) on a Konflux ephemeral OpenShift cluster (EaaS).
Runs OpenShift Lightspeed console e2e (Playwright) on a Konflux ephemeral OpenShift cluster (EaaS).
Provisions the cluster, installs the operator bundle from the snapshot, runs console tests,
collects artifacts, then deprovisions.
params:
Expand Down Expand Up @@ -172,24 +172,25 @@ spec:
- name: credentials
mountPath: /credentials
env:
- name: CYPRESS_KUBECONFIG_PATH
- name: KUBECONFIG_PATH
value: "/credentials/$(steps.get-kubeconfig.results.kubeconfig)"
- name: CYPRESS_LOGIN_IDP
- name: LOGIN_IDP
value: "kube:admin"
- name: LLM_TOKEN_PATH
value: "/var/run/openai/token"
- name: COMMIT_SHA
value: "$(params.commit)"
- name: PASSWORD_PATH
value: "/credentials/$(steps.get-kubeconfig.results.passwordPath)"
- name: CYPRESS_BASE_URL
- name: BASE_URL
value: "$(steps.get-kubeconfig.results.consoleURL)"
- name: BUNDLE_COMMIT_SHA
value: "$(params.commit)"
- name: CYPRESS_BUNDLE_IMAGE
- name: BUNDLE_IMAGE
value: "$(params.bundle-image)"
image: cypress/browsers:26.0.0
image: mcr.microsoft.com/playwright:v1.60.0-noble
script: |
#!/bin/bash
set -euo pipefail

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets try adding

  script: |
    #!/bin/bash
    set -euo pipefail

apt update && apt install -y jq git curl
cd /home
Expand All @@ -198,7 +199,7 @@ spec:
git remote add origin https://github.com/openshift/lightspeed-operator.git
git fetch --depth=1 --filter=blob:none origin "${COMMIT_SHA}"
git checkout "${COMMIT_SHA}"
git show "${COMMIT_SHA}:.tekton/integration-tests/scripts/run-console-cypress-tests.sh" | bash -s -- "lightspeed-console-plugin-pf5" "latest-4.18"
git show "${COMMIT_SHA}:.tekton/integration-tests/scripts/run-console-playwright-tests.sh" | bash -s -- "lightspeed-console-plugin-pf5" "latest-4.18"
- name: gather-cluster-resources
onError: continue
ref:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: ols-console-pre-commits
spec:
description: |
Runs OpenShift Lightspeed console e2e (Cypress) on a Konflux ephemeral OpenShift cluster (EaaS).
Runs OpenShift Lightspeed console e2e (Playwright) on a Konflux ephemeral OpenShift cluster (EaaS).
Provisions the cluster, installs the operator bundle from the snapshot, runs console tests,
collects artifacts, then deprovisions.
params:
Expand Down Expand Up @@ -172,24 +172,25 @@ spec:
- name: credentials
mountPath: /credentials
env:
- name: CYPRESS_KUBECONFIG_PATH
- name: KUBECONFIG_PATH
value: "/credentials/$(steps.get-kubeconfig.results.kubeconfig)"
- name: CYPRESS_LOGIN_IDP
- name: LOGIN_IDP
value: "kube:admin"
- name: LLM_TOKEN_PATH
value: "/var/run/openai/token"
- name: COMMIT_SHA
value: "$(params.commit)"
- name: PASSWORD_PATH
value: "/credentials/$(steps.get-kubeconfig.results.passwordPath)"
- name: CYPRESS_BASE_URL
- name: BASE_URL
value: "$(steps.get-kubeconfig.results.consoleURL)"
- name: BUNDLE_COMMIT_SHA
value: "$(params.commit)"
- name: CYPRESS_BUNDLE_IMAGE
- name: BUNDLE_IMAGE
value: "$(params.bundle-image)"
image: cypress/browsers:26.0.0
image: mcr.microsoft.com/playwright:v1.60.0-noble
script: |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

 script: |
    #!/bin/bash
    set -euo pipefail

#!/bin/bash
set -euo pipefail
apt update && apt install -y jq git curl
cd /home
Expand All @@ -198,7 +199,7 @@ spec:
git remote add origin https://github.com/openshift/lightspeed-operator.git
git fetch --depth=1 --filter=blob:none origin "${COMMIT_SHA}"
git checkout "${COMMIT_SHA}"
git show "${COMMIT_SHA}:.tekton/integration-tests/scripts/run-console-cypress-tests.sh" | bash -s -- "lightspeed-console-plugin" "latest-4.19"
git show "${COMMIT_SHA}:.tekton/integration-tests/scripts/run-console-playwright-tests.sh" | bash -s -- "lightspeed-console-plugin" "latest-4.19"
- name: gather-cluster-resources
onError: continue
ref:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
#!/usr/bin/env bash
# Konflux console Cypress: run from lightspeed-operator repo root at ${COMMIT_SHA}
# Konflux console Playwright: run from lightspeed-operator repo root at ${COMMIT_SHA}
# (Tekton performs apt + git init/fetch/checkout before piping this script).
#
# Usage (from Tekton, cwd = /home/lightspeed-operator):
# git show "${COMMIT_SHA}:.tekton/integration-tests/scripts/run-console-cypress-tests.sh" \
# git show "${COMMIT_SHA}:.tekton/integration-tests/scripts/run-console-playwright-tests.sh" \
# | bash -s -- "<related_images.json component name>" "<oc client channel e.g. latest-4.18>"
#
# Args:
# $1 Name in related_images.json for the console plugin (e.g. lightspeed-console-plugin-pf5 or lightspeed-console-plugin)
# $2 OpenShift client channel for install-oc-if-missing.sh (e.g. latest-4.18), aligned with the ephemeral cluster minor
#
# Env: COMMIT_SHA, CYPRESS_BASE_URL, CYPRESS_CONSOLE_IMAGE, CYPRESS_KUBECONFIG_PATH, PASSWORD_PATH, etc.
# Env: COMMIT_SHA, BASE_URL, KUBECONFIG_PATH, PASSWORD_PATH, LOGIN_IDP, BUNDLE_IMAGE, etc.

set -euo pipefail

console_component="${1:?usage: $0 <related_images component name> <ocp channel e.g. latest-4.18>}"
ocp_channel="${2:?usage: $0 <related_images name> <ocp channel>}"

echo "COMMIT_SHA: ${COMMIT_SHA}"
echo "CYPRESS_BASE_URL: ${CYPRESS_BASE_URL:-}"
echo "CYPRESS_CONSOLE_IMAGE: ${CYPRESS_CONSOLE_IMAGE:-}"
echo "BASE_URL: ${BASE_URL:-}"
echo "CONSOLE_IMAGE: ${CONSOLE_IMAGE:-}"
echo "---------------------------------------------"
export CYPRESS_LOGIN_PASSWORD="$(cat "${PASSWORD_PATH}")"
echo "(CYPRESS_LOGIN_PASSWORD set from PASSWORD_PATH; not echoed)"
if [[ ! -r "${PASSWORD_PATH}" ]]; then
echo "ERROR: PASSWORD_PATH '${PASSWORD_PATH}' is not readable" >&2
exit 1
fi
LOGIN_PASSWORD="$(cat "${PASSWORD_PATH}")"
export LOGIN_PASSWORD
echo "(LOGIN_PASSWORD set from PASSWORD_PATH; not echoed)"
echo "---------------------------------------------"

git show "${COMMIT_SHA}:.tekton/integration-tests/scripts/install-oc-if-missing.sh" | bash -s -- "${ocp_channel}"
Expand All @@ -41,7 +46,7 @@ echo "---------------------------------------------"
operator-sdk version
echo "---------------------------------------------"

# Valid XDG path for Cypress/Electron; must not reuse $PATH (breaks browser runtime).
# Valid XDG path for Playwright/Chromium; must not reuse $PATH (breaks browser runtime).
XDG_RUNTIME_DIR="${HOME:-/root}/.cache/xdgr"
mkdir -p "${XDG_RUNTIME_DIR}"
export XDG_RUNTIME_DIR
Expand All @@ -62,34 +67,33 @@ echo "---------------------------------------------"
echo "npm version: $(npm -v)"
echo "---------------------------------------------"
NODE_OPTIONS=--max-old-space-size=4096 npm ci --omit=optional --no-fund
npx cypress install
echo "---------------------------------------------"
export CYPRESS_LOGIN_PASSWORD="$(cat "${PASSWORD_PATH}")"
# Ephemeral clusters + console OAuth + plugin proxy are slow; before() often runs bundle then UI.
export CYPRESS_defaultCommandTimeout="${CYPRESS_defaultCommandTimeout:-120000}"
export CYPRESS_requestTimeout="${CYPRESS_requestTimeout:-120000}"
export CYPRESS_pageLoadTimeout="${CYPRESS_pageLoadTimeout:-180000}"
export CYPRESS_responseTimeout="${CYPRESS_responseTimeout:-180000}"
export CYPRESS_execTimeout="${CYPRESS_execTimeout:-600000}"

run_cypress() {
NO_COLOR=1 npx cypress run "$@"
# Install Playwright browsers (chromium only, with OS deps).
npx playwright install --with-deps chromium
echo "---------------------------------------------"

# Enable Playwright CI mode (forbidOnly, etc.).
export CI=true

run_playwright() {
npx playwright test "$@"
}

set +e
run_cypress
run_playwright
err_status=$?
if [[ "${err_status}" -ne 0 ]]; then
echo "---------------------------------------------"
echo "Cypress exited ${err_status}; waiting 30s for console/plugin then retrying once..."
echo "Playwright exited ${err_status}; waiting 30s for console/plugin then retrying once..."
sleep 30
run_cypress
run_playwright
err_status=$?
fi
echo -n "${err_status}" >/workspace/cypress-exit-code
echo "---------------------------------------------"
ls ./gui_test_screenshots
mv ./gui_test_screenshots /workspace/artifacts/
set -e
echo "Cypress exit code: ${err_status}"
echo "Playwright exit code: ${err_status}"
exit "${err_status}"
26 changes: 13 additions & 13 deletions bundle/manifests/lightspeed-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ metadata:
]
capabilities: Seamless Upgrades
console.openshift.io/operator-monitoring-default: "true"
createdAt: "2026-05-20T12:27:36Z"
createdAt: "2026-06-10T13:25:57Z"
features.operators.openshift.io/cnf: "false"
features.operators.openshift.io/cni: "false"
features.operators.openshift.io/csi: "false"
Expand Down Expand Up @@ -874,22 +874,22 @@ spec:
- --metrics-bind-address=:8443
- --secure-metrics-server
- --cert-dir=/etc/tls/private
- --service-image=registry.redhat.io/openshift-lightspeed/lightspeed-service-api-rhel9@sha256:6de7fa294e6c482c48c9ed81b9c4d27241a821665c2485c9b14371cd2a77766b
- --console-image=registry.redhat.io/openshift-lightspeed/lightspeed-console-plugin-rhel9@sha256:3413b67d587bddc6ff21bdb6a2c14aca348db7374740c621664f3a48f5548af4
- --console-image-pf5=registry.redhat.io/openshift-lightspeed/lightspeed-console-plugin-pf5-rhel9@sha256:bf1052cf922689eb3e802eeca41374294c61c6d27ed9f93584a800b7292a76ff
- --console-image-4-19=registry.redhat.io/openshift-lightspeed/lightspeed-console-plugin-419-rhel9@sha256:4afa6a9f49903fe44735a7480a2631ad8da5fb1f43f7c8225bd366e3487e1cdd
- --service-image=registry.redhat.io/openshift-lightspeed/lightspeed-service-api-rhel9@sha256:c5ec029c41c9ae7d9ead55c3c057fee4ac619c869e6a1ae041650e1d077d3c34
- --console-image=registry.redhat.io/openshift-lightspeed/lightspeed-console-plugin-rhel9@sha256:adecd476fe67c753a81926df492254e9030633863e1d509339229bcd1e403121
- --console-image-pf5=registry.redhat.io/openshift-lightspeed/lightspeed-console-plugin-pf5-rhel9@sha256:5c5f12331a5fb4e02413e0d44203c062701e1194e61e5c1c441f902766a47beb
- --console-image-4-19=registry.redhat.io/openshift-lightspeed/lightspeed-console-plugin-419-rhel9@sha256:dd6fa19b339188f5f3d2de0cac10d2d6d10ce7c3a41ce1fd40c077f88fe05c46
- --postgres-image=registry.redhat.io/rhel9/postgresql-16@sha256:42f385ac3c9b8913426da7c57e70bc6617cd237aaf697c667f6385a8c0b0118b
- --openshift-mcp-server-image=registry.redhat.io/openshift-lightspeed/openshift-mcp-server-rhel9@sha256:83f288c04aad9c742cf2cee51f45e1be1982e1fcc388d2112cf5483e381fff62
- --dataverse-exporter-image=registry.redhat.io/lightspeed-core/dataverse-exporter-rhel9@sha256:dc071421c925dbe55fd03765f7a2ede7140e9a4d49aa95c0b4d2435cbee95f0f
- --ocp-rag-image=registry.redhat.io/openshift-lightspeed/lightspeed-ocp-rag-rhel9@sha256:a5109af1488b1c23babbe585abfe66d9631e933dd28aebd2a0d5620a8c415879
- --ocp-rag-image=registry.redhat.io/openshift-lightspeed/lightspeed-ocp-rag-rhel9@sha256:6154de4ade379d23b8b983f8223fb219b275ba6339b4cfc150e151433e905e5c
command:
- /manager
env:
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.annotations['olm.targetNamespaces']
image: registry.redhat.io/openshift-lightspeed/lightspeed-rhel9-operator@sha256:2303a30dda8d4a9816cffd8f6e85307b425cd8774fa7293f3479b91ed1b73852
image: registry.redhat.io/openshift-lightspeed/lightspeed-rhel9-operator@sha256:8ff8c4c8227361a8d18efac50864e7e009478cee44c4820e459b527029d4e124
imagePullPolicy: Always
livenessProbe:
httpGet:
Expand Down Expand Up @@ -1000,20 +1000,20 @@ spec:
version: 1.1.1
relatedImages:
- name: lightspeed-service-api
image: registry.redhat.io/openshift-lightspeed/lightspeed-service-api-rhel9@sha256:6de7fa294e6c482c48c9ed81b9c4d27241a821665c2485c9b14371cd2a77766b
image: registry.redhat.io/openshift-lightspeed/lightspeed-service-api-rhel9@sha256:c5ec029c41c9ae7d9ead55c3c057fee4ac619c869e6a1ae041650e1d077d3c34
- name: lightspeed-console-plugin
image: registry.redhat.io/openshift-lightspeed/lightspeed-console-plugin-rhel9@sha256:3413b67d587bddc6ff21bdb6a2c14aca348db7374740c621664f3a48f5548af4
image: registry.redhat.io/openshift-lightspeed/lightspeed-console-plugin-rhel9@sha256:adecd476fe67c753a81926df492254e9030633863e1d509339229bcd1e403121
- name: lightspeed-console-plugin-pf5
image: registry.redhat.io/openshift-lightspeed/lightspeed-console-plugin-pf5-rhel9@sha256:bf1052cf922689eb3e802eeca41374294c61c6d27ed9f93584a800b7292a76ff
image: registry.redhat.io/openshift-lightspeed/lightspeed-console-plugin-pf5-rhel9@sha256:5c5f12331a5fb4e02413e0d44203c062701e1194e61e5c1c441f902766a47beb
- name: lightspeed-console-plugin-4-19
image: registry.redhat.io/openshift-lightspeed/lightspeed-console-plugin-419-rhel9@sha256:4afa6a9f49903fe44735a7480a2631ad8da5fb1f43f7c8225bd366e3487e1cdd
image: registry.redhat.io/openshift-lightspeed/lightspeed-console-plugin-419-rhel9@sha256:dd6fa19b339188f5f3d2de0cac10d2d6d10ce7c3a41ce1fd40c077f88fe05c46
- name: lightspeed-operator
image: registry.redhat.io/openshift-lightspeed/lightspeed-rhel9-operator@sha256:2303a30dda8d4a9816cffd8f6e85307b425cd8774fa7293f3479b91ed1b73852
image: registry.redhat.io/openshift-lightspeed/lightspeed-rhel9-operator@sha256:8ff8c4c8227361a8d18efac50864e7e009478cee44c4820e459b527029d4e124
- name: openshift-mcp-server
image: registry.redhat.io/openshift-lightspeed/openshift-mcp-server-rhel9@sha256:83f288c04aad9c742cf2cee51f45e1be1982e1fcc388d2112cf5483e381fff62
- name: lightspeed-to-dataverse-exporter
image: registry.redhat.io/lightspeed-core/dataverse-exporter-rhel9@sha256:dc071421c925dbe55fd03765f7a2ede7140e9a4d49aa95c0b4d2435cbee95f0f
- name: lightspeed-ocp-rag
image: registry.redhat.io/openshift-lightspeed/lightspeed-ocp-rag-rhel9@sha256:a5109af1488b1c23babbe585abfe66d9631e933dd28aebd2a0d5620a8c415879
image: registry.redhat.io/openshift-lightspeed/lightspeed-ocp-rag-rhel9@sha256:6154de4ade379d23b8b983f8223fb219b275ba6339b4cfc150e151433e905e5c
- name: lightspeed-postgresql
image: registry.redhat.io/rhel9/postgresql-16@sha256:42f385ac3c9b8913426da7c57e70bc6617cd237aaf697c667f6385a8c0b0118b
27 changes: 13 additions & 14 deletions related_images.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
[
{
"name": "lightspeed-service-api",
"image": "registry.redhat.io/openshift-lightspeed/lightspeed-service-api-rhel9@sha256:6de7fa294e6c482c48c9ed81b9c4d27241a821665c2485c9b14371cd2a77766b",
"revision": "6f38dc2e17e033ff471bec441db29b11e9c2d653"
"image": "registry.redhat.io/openshift-lightspeed/lightspeed-service-api-rhel9@sha256:c5ec029c41c9ae7d9ead55c3c057fee4ac619c869e6a1ae041650e1d077d3c34",
"revision": "40dba8bc1be5de941cf2ab8adf8fb02f57c1a990"
},
{
"name": "lightspeed-console-plugin",
"image": "registry.redhat.io/openshift-lightspeed/lightspeed-console-plugin-rhel9@sha256:3413b67d587bddc6ff21bdb6a2c14aca348db7374740c621664f3a48f5548af4",
"revision": "20441f1300aba215fd88e47304684d598d55e66f"
"image": "registry.redhat.io/openshift-lightspeed/lightspeed-console-plugin-rhel9@sha256:adecd476fe67c753a81926df492254e9030633863e1d509339229bcd1e403121",
"revision": "947b70c6164d5a376d77e41c18e85990b34947f2"
},
{
"name": "lightspeed-console-plugin-pf5",
"image": "registry.redhat.io/openshift-lightspeed/lightspeed-console-plugin-pf5-rhel9@sha256:bf1052cf922689eb3e802eeca41374294c61c6d27ed9f93584a800b7292a76ff",
"revision": "d8ba40de742d3a0700f3c15755f34f29e9d816ca"
"image": "registry.redhat.io/openshift-lightspeed/lightspeed-console-plugin-pf5-rhel9@sha256:5c5f12331a5fb4e02413e0d44203c062701e1194e61e5c1c441f902766a47beb",
"revision": "482bd9e9d20c785b47f5318c27ef6c9a5b6696ab"
},
{
"name": "lightspeed-console-plugin-4-19",
"image": "registry.redhat.io/openshift-lightspeed/lightspeed-console-plugin-419-rhel9@sha256:4afa6a9f49903fe44735a7480a2631ad8da5fb1f43f7c8225bd366e3487e1cdd",
"revision": "844f5e119cfec77609f98b68fdbaa0d1f018f03b"
"image": "registry.redhat.io/openshift-lightspeed/lightspeed-console-plugin-419-rhel9@sha256:dd6fa19b339188f5f3d2de0cac10d2d6d10ce7c3a41ce1fd40c077f88fe05c46",
"revision": "6fccf881aa14cbe71ad9ce76b899c856b231c22f"
},
{
"name": "lightspeed-operator",
"image": "registry.redhat.io/openshift-lightspeed/lightspeed-rhel9-operator@sha256:2303a30dda8d4a9816cffd8f6e85307b425cd8774fa7293f3479b91ed1b73852",
"revision": "16a2044a50cd2517ac8caad7dcc2e49a89f6fba0"
"image": "registry.redhat.io/openshift-lightspeed/lightspeed-rhel9-operator@sha256:8ff8c4c8227361a8d18efac50864e7e009478cee44c4820e459b527029d4e124",
"revision": "d6a919713a73911be7008c23804c0241b14d8e7d"
},
{
"name": "openshift-mcp-server",
"image": "registry.redhat.io/openshift-lightspeed/openshift-mcp-server-rhel9@sha256:83f288c04aad9c742cf2cee51f45e1be1982e1fcc388d2112cf5483e381fff62",
"revision": ""
"image": "registry.redhat.io/openshift-lightspeed/openshift-mcp-server-rhel9@sha256:83f288c04aad9c742cf2cee51f45e1be1982e1fcc388d2112cf5483e381fff62"
},
{
"name": "lightspeed-to-dataverse-exporter",
Expand All @@ -36,8 +35,8 @@
},
{
"name": "lightspeed-ocp-rag",
"image": "registry.redhat.io/openshift-lightspeed/lightspeed-ocp-rag-rhel9@sha256:a5109af1488b1c23babbe585abfe66d9631e933dd28aebd2a0d5620a8c415879",
"revision": "f604f4cbaf363485dc7bd2ea690bcf4e89510ff5"
"image": "registry.redhat.io/openshift-lightspeed/lightspeed-ocp-rag-rhel9@sha256:6154de4ade379d23b8b983f8223fb219b275ba6339b4cfc150e151433e905e5c",
"revision": "ebc4cf82147a274c544454c80c721adc7f650ce8"
},
{
"name": "lightspeed-postgresql",
Expand Down