Editor's Note
jenkins-pipeline
>
Install
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill jenkins-pipelineSKILL.md
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:
| Guide | Contents |
|---|---|
| Declarative Pipeline (Jenkinsfile) | Declarative Pipeline (Jenkinsfile) |
| Scripted Pipeline | Scripted 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
Installs648
GitHub Stars219
LanguageShell
AddedJun 8, 2025
Related Testing & QA Skills
View allfind-skills
vercel-labs/skills
1.1M18.6k1.1M
vercel-react-best-practices
vercel-labs/agent-skills
320.4K26.6k320.4K
frontend-design
anthropics/skills
299.9K134.5k299.9K
web-design-guidelines
vercel-labs/agent-skills
256.2K26.6k256.2K
remotion-best-practices
remotion-dev/skills
243.3K3.2k243.3K
agent-browser
vercel-labs/agent-browser
186.7K33.1k186.7K