jenkins-ops
SKILL.md
Jenkins Ops
Use this skill for routine Jenkins operations through the bundled script instead of ad-hoc curl.
Inputs
- Jenkins URL
- Jenkins user + API token (if auth required)
- job name
- optional build parameters
Prefer env vars:
JENKINS_URLJENKINS_USERJENKINS_TOKENJENKINS_TIMEOUT
Security notes
- Never hardcode real Jenkins URLs, usernames, or API tokens into the skill files.
- Prefer environment variables over command-line flags for tokens, to avoid leaking them into shell history, logs, screenshots, or shared terminal transcripts.
- Before publishing or sharing the skill, remove local cache files such as
__pycache__/and*.pyc.
Script
scripts/jenkins_cli.py
Common commands
List jobs:
python3 scripts/jenkins_cli.py list-jobs
Trigger build:
python3 scripts/jenkins_cli.py build --job "my-job"
If authentication is required, prefer exporting credentials in the shell first:
export JENKINS_URL='https://your-jenkins.example.com'
export JENKINS_USER='your-user'
export JENKINS_TOKEN='your-api-token'
python3 scripts/jenkins_cli.py build --job "my-job"
Trigger parameterized build:
python3 scripts/jenkins_cli.py build --job "my-job" \
--param branch=master \
--param env=staging
Check queue item:
python3 scripts/jenkins_cli.py queue --queue-id 12345
Get specific build status:
python3 scripts/jenkins_cli.py build-info --job "my-job" --build-number 456
Get latest build:
python3 scripts/jenkins_cli.py last-build --job "my-job"
Output contract
When reporting to user, include:
- Jenkins job name
- trigger result / queue id (if available)
- build number and final status (
SUCCESS/FAILURE/ABORTEDetc.) - build URL
Notes
- Script auto-requests Jenkins crumb for POST operations.
- If auth fails, verify user/token permissions for job read/build.
- Before triggering a build for a code change, prefer local preflight validation when the repo has a known compile/check command.
Preflight rule for virtual-anchor-control-js
When the user is about to trigger Jenkins packaging for /home/xuejb/.openclaw/workspace/virtual-anchor-control-js after code edits:
- Ensure local npm deps exist:
npm install - Run local Electron TypeScript compile first:
./node_modules/.bin/tsc -p electron - Only trigger Jenkins packaging after the local compile passes.
- If local compile fails, fix that first instead of using Jenkins as the first compiler.
This avoids repeated Jenkins round-trips for obvious TS/type errors.