Command Palette

Search for a command to run...

Назад к скиллам
скилл № 71051

jenkins

Use when the user asks about Jenkins, Jenkinsfile, declarative or scripted pipelines, shared libraries, multibranch pipelines, Jenkins agents on Kubernetes…

БесплатноБез исполняемых скриптов
j4flmaoот 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: &#39;*/main&#39;,
                    userRemoteConfigs: url: &#39;https://github.com/myorg/my-service.git&#39;
                )
            }
        }

        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
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • 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), без исполняемых скриптов.

Похожие скиллы

Сравнить jenkins с