Overview
Correlate failed builds and deployments with incidents. OpenSRE reads your Jenkins server over its REST API to answer: “was there a recent build or deployment that coincides with this alert?”Prerequisites
- Jenkins server reachable from OpenSRE
- Jenkins username with API access
- A Jenkins API token (not your account password)
Setup
Option 1: Interactive CLI
Option 2: Environment variables
Folder-organized jobs are supported — pass the full path, for example
team/payment-service.
Credentials
Create a Jenkins API token
In Jenkins: click your username (top-right) → Security → API Token → Add new Token → Generate. Copy the token — Jenkins shows it only once. API access uses HTTP Basic auth with your username and this token (not your password).Quick local test with Docker
Bring up a disposable Jenkins with a pre-configured admin account (no setup wizard):admin/admin is only valid because this is a disposable local instance with anonymous read disabled — Jenkins accepts a real password over Basic auth the same way it accepts a token when no token is configured. Never do this against a real server.
The empty temporary integration store prevents saved integrations from overriding the demo environment variables.
Verify:
list_jenkins_jobs, list_jenkins_running_builds, get_jenkins_pipeline_stages, and get_jenkins_build_log in a single supported turn (not a raw internal import):
list_jenkins_builds is the one registered tool not called here — list_jenkins_jobs already returned this job’s last-build number and status, so the agent went straight to get_jenkins_pipeline_stages/get_jenkins_build_log for that specific build instead of a redundant builds listing.
Teardown:
Investigation tools
Example investigation
Provide the affected job name so the agent can pull its recent builds and logs:API reference
Verify
Troubleshooting
Security
- Use an API token, never your Jenkins password.
- Prefer a dedicated Jenkins user with read access to the jobs OpenSRE should inspect.
- Store credentials in
.envor your secret manager — not in source control.