mcpField
J
jenkins-pipeline

jenkins-pipeline

github.com/aj-geddesCloud & DevOps3732.0k installsUpdated 34w ago
Repository

About jenkins-pipeline

A skill for building Jenkins pipelines with declarative and scripted approaches. It supports CI/CD automation for enterprise infrastructure, multi-stage builds, on-premise deployments, and parameterized jobs.

Key features

  1. 01Declarative and scripted pipeline guidance
  2. 02Multi-stage build patterns
  3. 03Parameterized pipeline examples
  4. 04Credential handling practices
  5. 05Reusable pipeline structure

Use cases

  1. 01Automate enterprise CI/CD workflows
  2. 02Run complex multi-stage builds
  3. 03Automate on-premise deployments
  4. 04Configure parameterized build jobs

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill jenkins-pipeline

After installing, type/jenkins-pipelinein Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
declarative-pipeline-jenkinsfile.md
scripted-pipeline.md
scripts/
validate-pipeline.sh
templates/
pipeline.yaml

Details

From the project README

Jenkins Pipeline

Table of Contents

Overview

Create enterprise-grade Jenkins pipelines using declarative and scripted approaches to automate building, testing, and deploying with advanced control flow.

When to Use

  • Enterprise CI/CD infrastructure
  • Complex multi-stage builds
  • On-premise deployment automation
  • Parameterized builds

Quick Start

Minimal working example:

pipeline {
    agent { label 'linux-docker' }
    environment {
        REGISTRY = 'docker.io'
        IMAGE_NAME = 'myapp'
    }
    parameters {
        string(name: 'DEPLOY_ENV', defaultValue: 'staging')
    }
    stages {
        stage('Checkout') { steps { checkout scm } }
        stage('Install') { steps { sh 'npm ci' } }
        stage('Lint') { steps { sh 'npm run lint' } }
        stage('Test') {
            steps {
                sh 'npm run test:coverage'
                junit 'test-results.xml'
            }
        }
        stage('Build') {
            steps {
                sh 'npm run build'
                archiveArtifacts artifacts: 'dist/**/*'
            }
        }
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Declarative Pipeline (Jenkinsfile)Declarative Pipeline (Jenkinsfile)
Scripted PipelineScripted Pipeline (Groovy), Multi-Branch Pipeline, Parameterized Pipeline, Pipeline with Credentials

Best Practices

✅ DO
  • Use declarative pipelines for clarity
  • Use credentials plugin for secrets
  • Archive artifacts and reports
  • Implement approval gates for production
  • Keep pipelines modular and reusable
❌ DON'T
  • Store credentials in pipeline code
  • Ignore pipeline errors
  • Skip test coverage reporting
  • Use deprecated plugins

Comments

Markdown supported