Query the status of a gangway job execution by ID
Retrieves the status and details of a gangway job execution by its ID.
/plugin marketplace add openshift-eng/ai-helpers/plugin install ci@ai-helpers<execution-id>ci:query-job-status
/query-job-status <execution-id>
The query-job-status command queries the status of a gangway job execution via the REST API using the execution ID returned when a job is triggered.
The command accepts:
It makes a GET request to the gangway API and returns the current status of the job including its name, type, status, and GCS path to artifacts if available. The curl_with_token.sh wrapper handles all authentication automatically.
The command performs the following steps:
Parse Arguments:
Execute API Request: Make a GET request to query the job status using the oc-auth skill's curl wrapper:
# Use curl_with_token.sh from oc-auth skill - it automatically adds the OAuth token
# app.ci cluster API: https://api.ci.l2s4.p1.openshiftapps.com:6443
curl_with_token.sh https://api.ci.l2s4.p1.openshiftapps.com:6443 -X GET \
https://gangway-ci.apps.ci.l2s4.p1.openshiftapps.com/v1/executions/<EXECUTION_ID>
The curl_with_token.sh wrapper retrieves the OAuth token from the app.ci cluster and adds it as an Authorization header automatically, without exposing the token.
Display Results: Parse and present the JSON response with:
id: The execution IDjob_name: The name of the jobjob_type: The type of job execution (PERIODIC, POSTSUBMIT, PRESUBMIT)job_status: Current status (SUCCESS, FAILURE, PENDING, RUNNING, ABORTED)gcs_path: Path to job artifacts in GCS (if available)Offer Follow-up Actions:
Important for Claude:
ci:oc-auth skill is loaded by invoking it with the Skill tool. The curl_with_token.sh script depends on this skill being active.Query status of a triggered job:
/query-job-status ca249d50-dee8-4424-a0a7-6dd9d5605267
Returns:
{
"id": "ca249d50-dee8-4424-a0a7-6dd9d5605267",
"job_name": "periodic-ci-openshift-release-master-ci-4.14-e2e-aws-ovn",
"job_type": "PERIODIC",
"job_status": "SUCCESS",
"gcs_path": "gs://origin-ci-test/logs/periodic-ci-openshift-release-master-ci-4.14-e2e-aws-ovn/1234567890"
}
Check running job:
/query-job-status 8f3a9b2c-1234-5678-9abc-def012345678
Status shows "RUNNING" - Claude offers to check again later.
Check failed job:
/query-job-status 5a6b7c8d-9e0f-1a2b-3c4d-5e6f7a8b9c0d
Status shows "FAILURE" - Claude displays the gcs_path for log analysis.
ca249d50-dee8-4424-a0a7-6dd9d5605267)