name: jenkins id: jenkins description: "Jenkins CI/CD integration for investigating builds, deployments, pipeline stages, and test results during RCA" category: cicd connection_check: method: get_token_data provider_key: jenkins required_field: base_url tools: - jenkins_rca index: "CI/CD -- investigate Jenkins builds, deployments, pipeline stages, logs, test results, OTel traces" rca_priority: 4 allowed-tools: jenkins_rca metadata: author: aurora version: "1.0"
Jenkins Integration
Overview
Jenkins CI/CD integration for investigating builds and deployments during Root Cause Analysis. Uses three Jenkins APIs: Core REST API, Pipeline REST API (wfapi), and Blue Ocean REST API.
Instructions
Tool: jenkins_rca
Unified Jenkins CI/CD investigation tool for Root Cause Analysis.
Actions:
recent_deployments-- Query stored deployment events; optionalservicefilter andtime_window_hoursbuild_detail-- Core API: SCM revision, changeSets, build causes, parameters. Requiresjob_path+build_numberpipeline_stages-- wfapi: stage-level breakdown with status and timing. Requiresjob_path+build_numberstage_log-- wfapi: per-stage log output for a specificnode_id. Requiresjob_path+build_number+node_idbuild_logs-- Core API: console output, truncated to ~1MB. Requiresjob_path+build_numbertest_results-- Core API: test report with failure details. Requiresjob_path+build_numberblue_ocean_run-- Blue Ocean API: run data with changeSet and commit info. Requirespipeline_name+run_numberblue_ocean_steps-- Blue Ocean API: step-level detail for a pipeline node. Requirespipeline_name+run_numbertrace_context-- Extract OTel W3C Trace Context; params:deployment_event_idorjob_path+build_number
Required params vary by action: job_path + build_number for Core/wfapi, pipeline_name + run_number for Blue Ocean. service is optional for recent_deployments.
RCA Investigation Flow
Recent deployments are a leading indicator of root cause. Always check if a deployment occurred shortly before the alert fired.
jenkins_rca(action='recent_deployments', service='SERVICE')-- Check for recent deploysjenkins_rca(action='build_detail', job_path='JOB', build_number=N)-- Build details + commitsjenkins_rca(action='pipeline_stages', job_path='JOB', build_number=N)-- Stage breakdownjenkins_rca(action='build_logs', job_path='JOB', build_number=N)-- Console outputjenkins_rca(action='test_results', job_path='JOB', build_number=N)-- Test failuresjenkins_rca(action='trace_context', deployment_event_id=ID)-- OTel trace correlation
Important Rules
- Always start with
recent_deploymentsto find deployments near the incident time. - Use
build_detailto get SCM changes and build causes before reading logs. - Use
pipeline_stagesfor stage-level breakdown to narrow which stage failed. - Use
trace_contextto correlate deployment events with distributed traces.
Recent Deployments
{jenkins_deploys_section}
Investigation Commands
jenkins_rca(action='recent_deployments', service='{service_name}')-- Recent deploysjenkins_rca(action='build_detail', job_path='JOB', build_number=N)-- Build details + commitsjenkins_rca(action='pipeline_stages', job_path='JOB', build_number=N)-- Stage breakdownjenkins_rca(action='stage_log', job_path='JOB', build_number=N, node_id='NODE')-- Stage logsjenkins_rca(action='build_logs', job_path='JOB', build_number=N)-- Console outputjenkins_rca(action='test_results', job_path='JOB', build_number=N)-- Test failuresjenkins_rca(action='blue_ocean_run', pipeline_name='PIPELINE', run_number=N)-- Blue Ocean datajenkins_rca(action='trace_context', deployment_event_id=ID)-- OTel trace correlation
Recent deployments are a leading indicator of root cause.