-
Notifications
You must be signed in to change notification settings - Fork 16
add doc for trigger prow job manually #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,55 @@ | ||||||
| # Triggering CI Jobs Manually via Gangway API | ||||||
|
|
||||||
| This document describes how to manually trigger CI jobs using the Gangway CI API. | ||||||
|
|
||||||
| ## Prerequisites | ||||||
|
|
||||||
| - Access to the OpenShift CI console via SSO | ||||||
| - The `oc` CLI installed locally | ||||||
|
|
||||||
| ## Steps | ||||||
|
|
||||||
| ### 1. Get the CLI Login Command | ||||||
|
|
||||||
| Open the following link in your browser and log in with SSO: | ||||||
|
|
||||||
| https://oauth-openshift.apps.ci.l2s4.p1.openshiftapps.com/oauth/token/display | ||||||
|
|
||||||
| After login, the page will display the `oc login` command with your token directly. | ||||||
|
|
||||||
| ### 2. Log in via the `oc` CLI | ||||||
|
|
||||||
| Run the login command from the previous step: | ||||||
|
|
||||||
| ```bash | ||||||
| oc login --token=<your-token> --server=https://api.ci.l2s4.p1.openshiftapps.com:6443 | ||||||
| ``` | ||||||
|
|
||||||
| ### 3. Trigger a Job via the Gangway API | ||||||
|
|
||||||
| Use `curl` to trigger a job by name: | ||||||
|
|
||||||
| ```bash | ||||||
| curl -X POST \ | ||||||
| -H "Authorization: Bearer $(oc whoami -t)" \ | ||||||
| -d '{"job_name": "${JOB_NAME}", "job_execution_type": "1"}' \ | ||||||
| https://gangway-ci.apps.ci.l2s4.p1.openshiftapps.com/v1/executions | ||||||
| ``` | ||||||
|
|
||||||
| Replace the `JOB_NAME` value with the name of the job you want to trigger. | ||||||
|
|
||||||
| Example: | ||||||
| ``` | ||||||
| curl -X POST \ | ||||||
| -H "Authorization: Bearer $(oc whoami -t)" \ | ||||||
| -d '{"job_name": "periodic-ci-openshift-online-rosa-e2e-main-periodics-rosa-hcp-e2e-stable-4-21", "job_execution_type": "1"}' \ | ||||||
| https://gangway-ci.apps.ci.l2s4.p1.openshiftapps.com/v1/executions | ||||||
| ``` | ||||||
|
|
||||||
| ### Available Job Names | ||||||
|
|
||||||
| The CI job names follow the pattern `periodic-ci-openshift-release-main-nightly-<version>-<job>`. To find the exact job name, check the job definitions in the [openshift/release](https://github.com/openshift/release) repository or the CI dashboard. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The job name pattern doesn't match the example provided. The described pattern Consider updating the pattern description to be more general or clarify that multiple patterns exist for different job types. 📝 Suggested revision-The CI job names follow the pattern `periodic-ci-openshift-release-main-nightly-<version>-<job>`. To find the exact job name, check the job definitions in the [openshift/release](https://github.com/openshift/release) repository or the CI dashboard.
+The CI job names typically follow the pattern `periodic-ci-<org>-<repo>-<branch>-<job-type>-<job-details>`. For example, nightly jobs use `periodic-ci-openshift-release-main-nightly-<version>-<job>`, while periodic jobs may use different patterns. To find the exact job name, check the job definitions in the [openshift/release](https://github.com/openshift/release) repository or the CI dashboard.📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
|
|
||||||
| ## References | ||||||
|
|
||||||
| - [Triggering Prow Jobs via REST](https://docs.ci.openshift.org/how-tos/triggering-prowjobs-via-rest/) | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a language tag to the example fenced block.
Line 46 opens a fenced code block without a language, which triggers markdownlint MD040.
Suggested fix
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 46-46: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents