Last Updated: November 21, 2025
Jenkins
Open-source automation server
Core Concepts
| Item | Description |
|---|---|
Job
|
Runnable task configuration |
Pipeline
|
Code-defined CI/CD workflow |
Node
|
Machine that executes jobs |
Plugin
|
Extension for additional functionality |
Workspace
|
Directory where jobs execute |
Build
|
Single execution of a job |
Pipeline Syntax
pipeline {
agent any
stages {
stage('Build') {
steps {
sh 'npm install'
sh 'npm run build'
}
}
stage('Test') {
steps {
sh 'npm test'
}
}
stage('Deploy') {
steps {
sh 'npm run deploy'
}
}
}
post {
always {
cleanWs()
}
}
}
Common Plugins
| Item | Description |
|---|---|
Git
|
Source code management |
Docker
|
Build and publish containers |
Pipeline
|
Pipeline as code support |
Credentials
|
Secure credential management |
Blue Ocean
|
Modern UI for pipelines |
Best Practices
- Use Jenkinsfile for pipeline as code
- Implement proper error handling and notifications
- Use shared libraries for reusable code
- Configure build retention policies
💡 Pro Tips
Quick Reference
Use declarative pipelines for simpler syntax