workspace/skills/jenkins-cicd/SKILL.md
Jenkins CI/CD pipeline management — monitor builds, trigger pipelines, analyze logs, and track SCM changes for network automation workflows.
npx skillsauth add automateyournetwork/netclaw jenkins-cicdInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Manage Jenkins CI/CD pipelines for network automation workflows. This skill provides operational workflows for monitoring job and build status, triggering builds with parameters, analyzing build logs for troubleshooting, and tracking SCM changes across Jenkins projects.
The Jenkins MCP server is an official Jenkins plugin running natively inside Jenkins via Streamable HTTP transport — netclaw connects to it as a remote HTTP client.
Never trigger a build or modify build metadata without explicit operator confirmation. All write operations (triggerBuild, updateBuild) require human-in-the-loop approval per Constitution XIV. Always read current state before proposing any write action (Constitution II — Read-Before-Write).
Monitor Jenkins job status, build results, queue state, and pipeline run history.
List all jobs — Use getJobs with optional pagination (offset, limit) and regex name filter to discover available jobs.
Tool: getJobs
Parameters: { "nameFilter": "deploy-.*", "offset": 0, "limit": 25 }
Get job details — Use getJob with the full job name (supports folder paths like folder1/folder2/job-name) to retrieve job configuration, last build number, and health status.
Tool: getJob
Parameters: { "fullName": "network-automation/deploy-network-config" }
Get build details — Use getBuild with job name and build number to retrieve result, duration, timestamp, parameters, and causes.
Tool: getBuild
Parameters: { "jobFullName": "deploy-network-config", "buildNumber": 42 }
Check queue status — Use getQueueItem to inspect queued build requests — waiting reason, position, estimated start time.
Tool: getQueueItem
Parameters: { "queueId": 1234 }
View pipeline run history — Use getPipelineRuns to list pipeline execution history with status, duration, and branch info.
Tool: getPipelineRuns
Parameters: { "jobFullName": "deploy-network-config" }
Trigger new builds with parameters, track queue-to-build progression, and update build metadata. All write operations require operator confirmation.
Verify job exists and check parameters — Use getJob to confirm the job exists and inspect its parameter definitions before triggering (read-before-write, Constitution II).
Tool: getJob
Parameters: { "fullName": "deploy-network-config" }
→ Returns parameter definitions: BRANCH (String), DRY_RUN (Boolean), ENVIRONMENT (Choice)
Present parameters and confirm with operator — Display the job's parameter definitions and proposed values. Wait for explicit operator approval before proceeding (Constitution XIV — Human-in-the-Loop).
Confirmation prompt:
"Ready to trigger build for 'deploy-network-config' with parameters:
- BRANCH: main (String)
- DRY_RUN: true (Boolean)
- ENVIRONMENT: staging (Choice: [dev, staging, prod])
Proceed? [yes/no]"
Trigger the build — Use triggerBuild with the confirmed parameters. Supported parameter types: String, Boolean, Choice, Text, Password, Run.
Tool: triggerBuild
Parameters: {
"jobFullName": "deploy-network-config",
"parameters": [
{ "name": "BRANCH", "value": "main" },
{ "name": "DRY_RUN", "value": "true" },
{ "name": "ENVIRONMENT", "value": "staging" }
]
}
→ Returns queue item ID
Track queue progression — Use getQueueItem to monitor until the build starts, then switch to getBuild.
Tool: getQueueItem
Parameters: { "queueId": <returned-queue-id> }
→ When build starts, returns build number
Monitor build until completion — Use getBuild to poll build status until result is available.
Tool: getBuild
Parameters: { "jobFullName": "deploy-network-config", "buildNumber": <build-number> }
→ Result: SUCCESS | FAILURE | UNSTABLE | ABORTED | NOT_BUILT
Update build metadata (optional) — Use updateBuild to set a descriptive display name or mark the build as keep-forever. Requires confirmation.
Tool: updateBuild
Parameters: {
"jobFullName": "deploy-network-config",
"buildNumber": <build-number>,
"displayName": "Production Deploy - v2.4.1",
"keepLog": true
}
Retrieve and search build logs for troubleshooting failed builds, identifying errors, and diagnosing pipeline issues.
Retrieve build log — Use getBuildLog with job name and build number. For large logs, use the start offset parameter for pagination.
Tool: getBuildLog
Parameters: { "jobFullName": "deploy-network-config", "buildNumber": 42 }
→ Returns console output text
Paginate large logs — If the log is truncated, use the start offset to retrieve subsequent sections.
Tool: getBuildLog
Parameters: { "jobFullName": "deploy-network-config", "buildNumber": 42, "start": 50000 }
→ Returns output starting from byte offset 50000
Search logs by pattern — Use searchBuildLog with a regex pattern to find specific lines (errors, warnings, timeouts).
Tool: searchBuildLog
Parameters: {
"jobFullName": "deploy-network-config",
"buildNumber": 42,
"pattern": "ERROR|FATAL|Exception"
}
→ Returns matching log lines
Retrieve pipeline-specific logs — Use getPipelineRunLog for pipeline jobs that produce structured run logs.
Tool: getPipelineRunLog
Parameters: { "jobFullName": "deploy-network-config", "runId": "42" }
Build logs can be very large (hundreds of MB for verbose builds). Guidelines:
searchBuildLog to find relevant sections before retrieving the full logstart offset pagination to retrieve specific sectionsERROR, FATAL, Exception, FAILURE, or timeout firstTrack source code changes associated with Jenkins jobs and builds — correlate builds with commits, find jobs by repository, and review change history.
Get job SCM configuration — Use getJobScm to view the repository URL, branch spec, and polling configuration for a job.
Tool: getJobScm
Parameters: { "jobFullName": "deploy-network-config" }
→ Returns: repository URL, branches, credential ID, polling config
Get build SCM details — Use getBuildScm to see the exact revision (commit hash) and branch checked out for a specific build.
Tool: getBuildScm
Parameters: { "jobFullName": "deploy-network-config", "buildNumber": 42 }
→ Returns: revision hash, branch name at build time
List change sets (commits) — Use getBuildChangeSets to see all commits included in a build — author, message, timestamp, and affected files.
Tool: getBuildChangeSets
Parameters: { "jobFullName": "deploy-network-config", "buildNumber": 42 }
→ Returns: list of change sets with commit details
Find jobs by repository — Use findJobsWithScmUrl to discover all Jenkins jobs configured to build from a specific repository.
Tool: findJobsWithScmUrl
Parameters: { "scmUrl": "https://github.com/org/network-configs" }
→ Returns: list of jobs using this repository
Verify Jenkins connectivity, authentication, and instance health. Recommended as a pre-flight check before first use and as a diagnostic tool when other operations fail.
Verify authentication — Use whoAmI to confirm the connection works and inspect the authenticated user's identity and permissions.
Tool: whoAmI
Parameters: {}
→ Returns: user name, authorities/permissions list
Check instance health — Use getStatus to verify Jenkins is healthy and operational.
Tool: getStatus
Parameters: {}
→ Returns: mode (NORMAL/SHUTDOWN), version, quietingDown status
whoAmI and getStatus to validate the connectionwhoAmI to diagnose credential issuesgetStatus to check if Jenkins is shutting down or in maintenance modewhoAmI to verify the user has required authoritiesAll Jenkins interactions are logged to the GAIT audit trail via gait_mcp tools at the skill invocation level (per Constitution IV — GAIT Audit Trail).
For each Jenkins operation:
Before invocation: Log the tool name and parameters being sent
gait_mcp.log_action({
action: "jenkins_tool_call",
tool: "getJobs",
parameters: { "nameFilter": "deploy-.*" },
status: "initiated"
})
After invocation: Log the result summary
gait_mcp.log_action({
action: "jenkins_tool_call",
tool: "getJobs",
result_summary: "Returned 12 jobs matching filter",
status: "completed"
})
For write operations: Log the confirmation step
gait_mcp.log_action({
action: "jenkins_write_confirmation",
tool: "triggerBuild",
parameters: { "jobFullName": "deploy-network-config", "parameters": [...] },
operator_confirmed: true,
status: "approved"
})
getJob to verify a job exists and inspect its parameters before triggerBuild or updateBuildfolder1/folder2/job-name) — always use the full namegetJob before triggering — pass correct types (String, Boolean, Choice, Text, Password, Run)searchBuildLog before full log retrieval to avoid overwhelming context with large console outputtesting
Human-in-the-loop escalation via HumanRail — route low-confidence agent decisions, pre-destructive operation approvals, and ambiguous incident tickets to real human engineers. Human answers are verified and returned as structured output. Workers are paid via Lightning Network. Use when the agent is uncertain, when a destructive change needs explicit human sign-off beyond a ServiceNow CR, or when an ambiguous ticket requires human triage before automated handling.
testing
Manage EVE-NG node lifecycle. Use when listing nodes, checking runtime state, creating or deleting nodes, starting or stopping nodes or whole labs, verifying node details, or wiping node NVRAM back to factory defaults.
development
Manage EVE-NG labs and platform inventory. Use when listing labs, checking lab metadata, creating or deleting labs, importing or exporting lab archives, checking EVE-NG health or auth, or verifying available node images before build work.
tools
Execute live CLI commands on running EVE-NG nodes over telnet console. Use when running show commands, making live config changes, verifying protocol state, testing connectivity, checking console readiness, or interacting with IOS, Junos, VPCS, EOS, or NX-OS nodes.