jenkins
Use when the user asks about Jenkins, Jenkinsfile, declarative or scripted pipelines, shared libraries, multibranch pipelines, Jenkins agents on Kubernetes…
от j4flmao★ 47 звёзд на GitHub
Установить jenkins в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Jenkins
Purpose
Design, configure, and operate Jenkins for CI/CD pipelines with declarative/scripted pipelines, shared libraries, multibranch automation, security hardening, and high availability.
Agent Protocol
Trigger
Exact user phrases: "jenkins", "jenkins pipeline", "jenkinsfile", "declarative pipeline", "scripted pipeline", "shared library", "multibranch pipeline", "jenkins agent", "jenkins credentials", "generative AI", "pipeline as code", "jcasc", "configuration as code", "jenkins operator".
Input Context
- Jenkins version and installation method (war, Docker, Helm, OC/K8s Operator).
- Pipeline type (Declarative or Scripted).
- Credentials and secrets management approach.
- Agent configuration (static, dynamic, Kubernetes, Docker).
- Shared library usage and structure.
- Plugin list (especially security-critical ones).
Output Artifact
Jenkinsfile, shared library Groovy, CasC YAML, or Helm values for Jenkins deployment.
Response Format
Groovy (Jenkinsfile or shared library) or YAML. No preamble.
Completion Criteria
- Jenkinsfile written with stages, agent, environment, post, when.
- Declarative pipeline with proper error handling (post always, try-catch).
- Credentials configured (username-password, SSH, secret text, file).
- Jenkins Configuration as Code (CasC) defined for reproducible setup.
- Shared library created with reusable pipeline steps.
- Multibranch pipeline configured for PR-based workflows.
- Security: CSRF protection, agent → master access control, credential binding.
- High availability: external database, shared storage, load balancer.
Max Response Length
400 lines.
Quick Start
Install via helm install jenkins jenkins/jenkins -f values.yaml → Access UI → Create Multibranch Pipeline pointing to GitHub repo → Jenkinsfile in repo root → Define stages (Checkout → Build → Test → Deploy) → Set up credentials → Run pipeline → Monitor.
Decision Tree: Pipeline Types
| Feature | Declarative | Scripted |
|---|---|---|
| Structured | Yes (stage > steps) | Free-form Groovy |
| Error handling | post blocks | try-catch-finally |
| Parallel | parallel directive |
parallel in script block |
| When conditions | when directive |
if-else Groovy |
| Input/approval | input directive |
input step |
| Matrix | matrix directive |
Loops + parallel |
| Best for | 90% of pipelines | Complex conditional logic |
| Recommendation | Start here | Only when declarative can't express |
Core Workflow
Step 1: Declarative Pipeline
pipeline {
agent {
kubernetes {
yaml '''
apiVersion: v1
kind: Pod
spec:
containers:
- name: ci
image: jenkins/inbound-agent:<pinned-tag>
command:
- cat
tty: true
- name: docker
image: docker:24-cli
command:
- cat
tty: true
volumeMounts:
- name: docker-socket
mountPath: /var/run/docker.sock
- name: sonar
image: sonarsource/sonar-scanner-cli:<pinned-tag>
command:
- cat
tty: true
volumes:
- name: docker-socket
hostPath:
path: /var/run/docker.sock
'''
defaultContainer: 'ci'
}
}
environment {
DOCKER_REGISTRY = 'ghcr.io/myorg'
APP_NAME = 'my-service'
DOCKER_TAG = "${env.BRANCH_NAME}-${env.BUILD_NUMBER}"
}
options {
buildDiscarder(logRotator(numToKeepStr: '10'))
timestamps()
ansiColor('xterm')
disableConcurrentBuilds()
timeout(time: 30, unit: 'MINUTES')
}
triggers {
pollSCM('H/5 * * * *')
}
parameters {
choice(name: 'ENVIRONMENT', choices: ['dev', 'staging', 'prod'], description: 'Deploy target')
booleanParam(name: 'SKIP_TESTS', defaultValue: false, description: 'Skip test stage')
}
stages {
stage('Checkout') {
steps {
checkout scmGit(
branches: name: '*/main',
userRemoteConfigs: url: 'https://github.com/myorg/my-service.git'
)
}
}
stage('Lint') {
steps {
container('ci') {
sh 'npm run lint'
}
}
}
stage('Test') {
when {
expression { !params.SKIP_TESTS }
}
parallel {
stage('Unit') {
steps {
container('ci') {
sh 'npm run test:unit'
}
}
}
stage('Integration') {
steps {
container('ci') {
sh 'npm run test:integration'
}
}
}
}
}
stage('Quality Gate') {
steps {
container('so
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/jenkins-advanced.md
- references/jenkins-best-practices.md
- references/jenkins-fundamentals.md
- references/jenkins-ops.md
- references/jenkins-pipeline-as-code.md
- references/jenkins-pipeline.md
- references/jenkins-security-hardening.md
- references/jenkins-shared-libraries.md
FAQ
Что делает скилл jenkins?
Use when the user asks about Jenkins, Jenkinsfile, declarative or scripted pipelines, shared libraries, multibranch pipelines, Jenkins agents on Kubernetes, credentials, JCasC (Configuration as Code), or Jenkins security and backup. Produces Jenkinsfiles and controller config. Not for GitHub Actions (use github-actions) or GitLab CI (use devops-gitlab-ci).
Как установить скилл jenkins?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл jenkins запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…