home / skills / openclaw / skills / jenkins
This skill helps you manage Jenkins jobs, trigger builds, and monitor pipelines via API to streamline CI/CD workflows.
npx playbooks add skill openclaw/skills --skill jenkinsReview the files below or copy the command above to add this skill to your agents.
---
name: jenkins
description: Interact with Jenkins CI/CD server via REST API. Use when you need to trigger builds, check build status, view console output, manage jobs, or monitor Jenkins nodes and queue. Supports deployment to different Jenkins instances via environment variables.
---
# Jenkins
Interact with Jenkins CI/CD server through REST API.
## Required environment variables
- `JENKINS_URL` (example: `https://jenkins.example.com`)
- `JENKINS_USER` (your Jenkins username)
- `JENKINS_API_TOKEN` (API token from Jenkins user settings)
## List jobs
```bash
node {baseDir}/scripts/jenkins.mjs jobs
node {baseDir}/scripts/jenkins.mjs jobs --pattern "deploy-*"
```
## Trigger build
```bash
node {baseDir}/scripts/jenkins.mjs build --job "my-job"
node {baseDir}/scripts/jenkins.mjs build --job "my-job" --params '{"BRANCH":"main","ENV":"dev"}'
```
## Check build status
```bash
node {baseDir}/scripts/jenkins.mjs status --job "my-job"
node {baseDir}/scripts/jenkins.mjs status --job "my-job" --build 123
node {baseDir}/scripts/jenkins.mjs status --job "my-job" --last
```
## View console output
```bash
node {baseDir}/scripts/jenkins.mjs console --job "my-job" --build 123
node {baseDir}/scripts/jenkins.mjs console --job "my-job" --last --tail 50
```
## Stop build
```bash
node {baseDir}/scripts/jenkins.mjs stop --job "my-job" --build 123
```
## View queue
```bash
node {baseDir}/scripts/jenkins.mjs queue
```
## View nodes
```bash
node {baseDir}/scripts/jenkins.mjs nodes
```
## Notes
- URL and credentials are variables by design for cross-environment deployment.
- API responses are output as JSON.
- For parameterized builds, use `--params` with JSON string.
This skill manages Jenkins jobs, builds, and pipelines through the Jenkins remote API. It lets you list jobs, trigger builds, and monitor build status programmatically. Designed for automation and integration with other tools or bots.
The skill talks to a Jenkins server using the Jenkins REST API and basic token-based authentication. It retrieves job lists and build metadata, sends build trigger requests, and polls build status endpoints to report progress and results. Environment variables store the server URL, username, and API token for secure, repeatable calls.
What credentials are required?
A Jenkins username and API token with permission to list jobs and trigger builds. Store them securely as environment variables.
How do I check build progress?
Query the job's lastBuild API JSON endpoint and read fields like result, building, and duration to determine progress and outcome.