$npx -y skills add redhat-developer/rhdh-skill --skill prow-trigger-nightlyTrigger RHDH nightly ProwJobs on demand via the OpenShift CI Gangway REST API. Supports both rhdh and rhdh-plugin-export-overlays repos. Use when the user wants to trigger, run, kick off, or start a nightly CI job, run an on-demand E2E nightly test, list available nightly jobs, o
| 1 | # Trigger Nightly ProwJobs |
| 2 | |
| 3 | Trigger RHDH nightly ProwJobs via the OpenShift CI Gangway REST API. |
| 4 | |
| 5 | Supports two repositories: |
| 6 | |
| 7 | - **rhdh** — the main RHDH application (`periodic-ci-redhat-developer-rhdh-*-nightly`) |
| 8 | - **rhdh-plugin-export-overlays** — plugin export overlays (`periodic-ci-redhat-developer-rhdh-plugin-export-overlays-*-nightly`) |
| 9 | |
| 10 | ## Script Location |
| 11 | |
| 12 | All commands below use paths relative to this skill's directory: |
| 13 | `skills/prow-trigger-nightly/scripts/trigger_nightly_job.py` |
| 14 | |
| 15 | ## Prerequisites |
| 16 | |
| 17 | - Python 3.9+ |
| 18 | - `oc` CLI installed (for authentication to OpenShift CI) |
| 19 | |
| 20 | ## Flow |
| 21 | |
| 22 | 1. Fetch available jobs and let the user pick one |
| 23 | 2. Ask about image override and additional options (fork, alerts) |
| 24 | 3. Show the command, confirm, execute, report results |
| 25 | |
| 26 | ## Step 1: Fetch Jobs and Select |
| 27 | |
| 28 | List configured nightly jobs: |
| 29 | |
| 30 | ```bash |
| 31 | uv run scripts/trigger_nightly_job.py --list |
| 32 | ``` |
| 33 | |
| 34 | Present the jobs in a table with columns: short name and which branches have it. Derive the short name from the job name part after the branch segment (e.g. `e2e-ocp-helm-nightly` -> "OCP Helm"): |
| 35 | |
| 36 | | Repo | Job | main | release-1.9 | release-1.8 | |
| 37 | |------|-----|------|-------------|-------------| |
| 38 | | rhdh | OCP Helm | x | x | x | |
| 39 | | rhdh | AKS Helm | x | x | | |
| 40 | | overlays | OCP Helm | x | | | |
| 41 | |
| 42 | Then ask the user to describe which job and branch they want in natural language. |
| 43 | |
| 44 | ### Natural Language Mapping |
| 45 | |
| 46 | Map the user's description to the matching full job name from the fetched list. If no branch is mentioned, default to `main`: |
| 47 | |
| 48 | **RHDH repo jobs:** |
| 49 | |
| 50 | - "ocp helm" / "openshift helm" -> `e2e-ocp-helm-nightly` (not upgrade, not versioned) |
| 51 | - "operator" / "ocp operator" -> `e2e-ocp-operator-nightly` (not auth-providers) |
| 52 | - "helm upgrade" / "upgrade test" -> `e2e-ocp-helm-upgrade-nightly` |
| 53 | - "auth providers" / "authentication" -> `e2e-ocp-operator-auth-providers-nightly` |
| 54 | - "4.17", "4.19", "4.20", "4.21" -> `e2e-ocp-v4-{VERSION}-helm-nightly` |
| 55 | - "aks helm" / "azure helm" -> `e2e-aks-helm-nightly` |
| 56 | - "aks operator" / "azure operator" -> `e2e-aks-operator-nightly` |
| 57 | - "eks helm" / "aws helm" -> `e2e-eks-helm-nightly` |
| 58 | - "eks operator" / "aws operator" -> `e2e-eks-operator-nightly` |
| 59 | - "gke helm" / "google helm" -> `e2e-gke-helm-nightly` |
| 60 | - "gke operator" / "google operator" -> `e2e-gke-operator-nightly` |
| 61 | - "osd" / "osd gcp" -> `e2e-osd-gcp-helm-nightly` or `e2e-osd-gcp-operator-nightly` |
| 62 | - Branch: "1.9", "release 1.9", "1.8 branch" -> match from that branch |
| 63 | - Multiple: "all AKS jobs", "all Operator jobs on main" -> offer to trigger them in sequence |
| 64 | |
| 65 | **Overlay repo jobs:** |
| 66 | |
| 67 | - "overlay nightly" / "overlay helm" / "overlays nightly" -> `periodic-ci-redhat-developer-rhdh-plugin-export-overlays-main-e2e-ocp-helm-nightly` |
| 68 | |
| 69 | ### Shared Cluster Constraint (GKE / OSD-GCP only) |
| 70 | |
| 71 | GKE and OSD-GCP each share a single cluster — never run two jobs on the same platform simultaneously. Before triggering, warn the user. |
| 72 | |
| 73 | ## Step 2: Options |
| 74 | |
| 75 | ### Overlay repo jobs |
| 76 | |
| 77 | Overlay jobs support fork overrides (`--org`, `--repo`, `--branch`), catalog index override (`--catalog-index-image`), and Playwright version override (`--playwright-version`). |
| 78 | |
| 79 | Image overrides (`--image-registry`, `--image-repo`, `--tag`), `--chart-version`, and `--send-alerts` are NOT supported — the script will error if these are passed for an overlay job. |
| 80 | |
| 81 | If the user doesn't need any overrides, skip this step and go directly to Step 3. |
| 82 | |
| 83 | ### RHDH repo jobs |
| 84 | |
| 85 | Present all options together. The user picks by number — multiple selections allowed (e.g. "2, 5"): |
| 86 | |
| 87 | **Image override:** |
| 88 | |
| 89 | 1. **Default image** — no image flags, use whatever the job is configured with |
| 90 | 2. **Custom tag only** — override just the tag, keep default registry and repo |
| 91 | 3. **Custom repo + tag** — override image repository and tag, keep default registry (`quay.io`) |
| 92 | 4. **Fully custom image** — override registry, repo, and tag |
| 93 | |
| 94 | **Catalog & chart override:** |
| 95 | 5. **Catalog index image** — override the plugin catalog index image (`--catalog-index-image`) |
| 96 | 6. **Chart version** — override the Helm chart version (`--chart-version`) |
| 97 | |
| 98 | **Additional options:** |
| 99 | 7. **Fork override** — run against a fork instead of `redhat-developer/rhdh` |
| 100 | 8. **Send Slack alerts** — notify via `--send-alerts` |
| 101 | |
| 102 | Constraint: `--image-repo` requires `--tag`, but `--tag` works on its own. `--playwright-version` is overlay-only and will error for RHDH jobs. |
| 103 | |
| 104 | ### Follow-up based on selections |
| 105 | |
| 106 | **If 2 or 3 selected (quay.io registry)** — fetch available t |