skills/devops-sre/ci-cd-ops/SKILL.md
Handles CI/CD pipelines for automated building, testing, and deployment using tools like Jenkins and GitHub Actions in D
npx skillsauth add alphaonedev/openclaw-graph ci-cd-opsInstall 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.
This skill automates CI/CD pipelines for building, testing, and deploying code using Jenkins and GitHub Actions, focusing on DevOps workflows to streamline software delivery.
Use this skill when setting up automated pipelines for code changes, such as in microservices architectures or when integrating with version control systems like Git. Apply it for frequent deployments in agile teams or when scaling DevOps operations to reduce manual errors.
To use this skill, invoke it via the OpenClaw agent with specific commands. For example, start a pipeline by passing a repository URL and configuration file. Always specify the tool (e.g., Jenkins or GitHub Actions) in the command. Use JSON or YAML for input parameters. Example pattern: Agent command -> Parse inputs -> Execute pipeline -> Monitor output.
Use these CLI commands or API calls directly. Authentication requires setting $JENKINS_API_KEY or $GITHUB_TOKEN as environment variables.
jenkins build -job MyJob -params '{"branch":"main"}' -key $JENKINS_API_KEY to trigger a build job.
curl -X POST http://jenkins.example.com/job/MyJob/build \
-H "Authorization: Bearer $JENKINS_API_KEY" \
--data 'parameter=[{"name":"branch","value":"main"}]'
gh workflow run MyWorkflow.yml -f branch=main -token $GITHUB_TOKEN.
curl -X POST https://api.github.com/repos/user/repo/actions/workflows/MyWorkflow.yml/dispatches \
-H "Authorization: token $GITHUB_TOKEN" \
-d '{"ref":"main"}'
-f for file paths (e.g., workflow files), -env for environment variables (e.g., -env KEY=VALUE), and -wait to block until completion.pipeline { agent any stages { stage('Build') { steps { sh 'mvn build' } } } }.Integrate this skill with existing tools by exporting necessary credentials as env vars (e.g., $GITHUB_TOKEN). For Jenkins, connect via HTTP endpoints; for GitHub Actions, use webhooks. Example: Hook into a CI tool by adding a post-build step that calls an OpenClaw agent command, like agent invoke ci-cd-ops --action deploy --config path/to/config.yml. Ensure compatibility by matching versions, e.g., Jenkins 2.3+ or GitHub Actions API v3. Avoid conflicts by isolating environments using Docker containers for pipeline runs.
Always check command exit codes; for Jenkins, parse API responses for HTTP 4xx/5xx errors. Use try-catch in scripts, e.g., in a bash wrapper: jenkins build ... || echo "Error: Build failed with code $?". For GitHub Actions, handle webhook failures by retrying up to 3 times with exponential backoff. Log errors with timestamps and include stack traces. Common issues: Invalid tokens—verify with echo $GITHUB_TOKEN before use; resolve with export GITHUB_TOKEN=new_value. Use verbose mode flags like -v for debugging.
agent invoke ci-cd-ops --tool jenkins --repo [email protected]:user/app.git --job BuildAndDeploy. This triggers a build, runs tests, and deploys if successful. Config snippet:
pipeline {
stages {
stage('Test') { steps { sh 'mvn test' } }
}
}
agent invoke ci-cd-ops --tool github --workflow ci.yml --event pull_request. This runs linting and tests on PRs. API call example:
curl -X POST https://api.github.com/.../dispatches -H "Authorization: token $GITHUB_TOKEN"
tools
Root web development: project structure, tooling selection, deployment decisions
development
WebAssembly: Rust/Go/C to WASM, wasm-bindgen, Emscripten, WASM Component Model
development
Vue 3: Composition API script setup, Pinia, Vue Router 4, SFCs, Vite, Nuxt 3
tools
Tailwind CSS 4: utility classes, config, JIT, arbitrary values, darkMode, plugins, shadcn/ui