Alison Aquinas logoAlison's LLM Plugins

jenkins-cd

Included in pluginci-cdView on GitHub ↗

Files

SKILL.mdagentsreferences

Install

Install the containing plugin
/plugin install ci-cd@llm-skills
Invoke this skill after installation
/ci-cd:jenkins-cd
Download jenkins-cd-skill.zip
This skill is bundled inside ci-cd. Install the plugin once, then Claude Code can use any of its included skills. Browse the full plugin repository at github.com/alisonaquinas/llm-ci-dev.

SKILL.md


name: jenkins-cd description: > Deploy applications with Jenkins Pipeline stages. Configure deployment workflows, manage credentials, target diverse platforms, and implement advanced deployment strategies.

Jenkins CD

Configure Jenkins Pipeline stages for application deployments. This skill covers deployment patterns, credential management, deployment targets, and strategies for safe production rollouts.


Intent Router

Load reference files for depth on specific topics:

TopicFileLoad when...
Deployment Stagesreferences/deployment-stages.mdConfiguring approval gates, milestone tracking, resource locking, and promotion patterns
Credentials & Secretsreferences/credentials-and-secrets.mdManaging Jenkins Credentials, binding secrets, integrating external vaults, and rotation
Deployment Targetsreferences/deployment-targets.mdDeploying to Kubernetes, AWS, Docker, SSH hosts, Ansible, artifact repositories
Strategies & Rollbackreferences/strategies-and-rollback.mdBlue-green, canary, rolling updates, rollback patterns, artifact promotion

Quick Start

Basic Deployment Stage Pattern

pipeline {
  agent any
  stages {
    stage('Deploy to Staging') {
      steps {
        sh 'kubectl apply -f staging-deployment.yaml'
        sh 'kubectl rollout status deployment/app -n staging'
      }
    }
    stage('Approval Gate') {
      steps {
        input message: 'Approve production deployment?', ok: 'Deploy'
      }
    }
    stage('Deploy to Production') {
      steps {
        sh 'kubectl apply -f prod-deployment.yaml'
      }
    }
  }
}

Input Step for Approval

stage('Promote to Production') {
  steps {
    input(
      id: 'approve',
      message: 'Deploy to production?',
      ok: 'Deploy',
      submitter: 'admin-group'
    )
    echo 'Approved by: ${APPROVED_BY}'
  }
}

Lockable Resources Plugin

stage('Deploy Database') {
  steps {
    lock('prod-database') {
      sh 'flyway migrate -schemas=public -locations=filesystem:./migrations'
    }
  }
}

Credentials Binding

stage('Deploy') {
  steps {
    withCredentials([
      usernamePassword(credentialsId: 'docker-hub', usernameVariable: 'DOCKER_USER', passwordVariable: 'DOCKER_PASS'),
      string(credentialsId: 'slack-token', variable: 'SLACK_TOKEN')
    ]) {
      sh '''
        echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin
        docker push myapp:latest
      '''
    }
  }
}

Post-Deploy Health Check

stage('Verify Deployment') {
  steps {
    retry(3) {
      sh 'curl -f http://app-prod:8080/health || exit 1'
    }
  }
  post {
    failure {
      sh 'kubectl rollout undo deployment/app -n production'
    }
  }
}

Related References

  • Load Deployment Stages to understand input steps, milestone tracking, and resource locking
  • Load Credentials & Secrets to manage Jenkins Credentials store and external vaults
  • Load Deployment Targets to deploy to Kubernetes, AWS, Docker, SSH, Ansible, artifact repositories
  • Load Strategies & Rollback for blue-green, canary, rolling updates, and rollback patterns
← Back to marketplace