$ pipeline { agent any stages { stage('Build') { steps { sh 'mvn clean package' } } stage('Test') { steps { sh 'mvn test' } } }
}
pipeline { agent any stages { stage('Build') { steps { sh 'mvn clean package' } } stage('Test') { steps { sh 'mvn test' } } }
}
pipeline { agent any stages { stage('Build') { steps { sh 'mvn clean package' } } stage('Test') { steps { sh 'mvn test' } } }
}
withCredentials([string(credentialsId: '-weight: 500;">docker-pass', variable: 'PASS')]) { sh '-weight: 500;">docker login'
}
withCredentials([string(credentialsId: '-weight: 500;">docker-pass', variable: 'PASS')]) { sh '-weight: 500;">docker login'
}
withCredentials([string(credentialsId: '-weight: 500;">docker-pass', variable: 'PASS')]) { sh '-weight: 500;">docker login'
}
-weight: 500;">docker build -t app:v1 .
-weight: 500;">docker push repo/app:v1
-weight: 500;">docker build -t app:v1 .
-weight: 500;">docker push repo/app:v1
-weight: 500;">docker build -t app:v1 .
-weight: 500;">docker push repo/app:v1
@Library('devops-lib') _
buildApp()
deployApp()
@Library('devops-lib') _
buildApp()
deployApp()
@Library('devops-lib') _
buildApp()
deployApp()
Developer pushes code ↓
GitHub Webhook ↓
Jenkins Pipeline ↓
Build Application ↓
Run Tests ↓
SonarQube Scan ↓
Build Docker Image ↓
Push to DockerHub ↓
Deploy to Kubernetes ↓
ArgoCD Sync
Developer pushes code ↓
GitHub Webhook ↓
Jenkins Pipeline ↓
Build Application ↓
Run Tests ↓
SonarQube Scan ↓
Build Docker Image ↓
Push to DockerHub ↓
Deploy to Kubernetes ↓
ArgoCD Sync
Developer pushes code ↓
GitHub Webhook ↓
Jenkins Pipeline ↓
Build Application ↓
Run Tests ↓
SonarQube Scan ↓
Build Docker Image ↓
Push to DockerHub ↓
Deploy to Kubernetes ↓
ArgoCD Sync - What is CI/CD
- Why Jenkins is used
- Jenkins architecture (Controller + Agents)
- Jenkins installation Linux
Docker
AWS EC2
- Jenkins UI walkthrough
- Jenkins jobs overview - Freestyle jobs
- Pipeline jobs
- Multibranch pipelines
- Folder organization - Build a simple Java / NodeJS project. - environment
- post actions - Groovy syntax
- stage block
- scripted vs declarative - Writing Jenkinsfile
- Environment variables
- Pipeline parameters
- Retry and timeout
- Error handling
- Post actions
- Parallel stages - Credentials store
- Username/password
- Secret text
- Secret files
- Using credentials in pipelines - GitHub webhook
- GitLab webhook
- Bitbucket webhook
- Poll SCM vs webhook
- Automatic pipeline trigger - Pipeline Plugin
- Docker Plugin
- Kubernetes Plugin
- SonarQube Plugin - Installing plugins
- Managing plugin updates
- Plugin dependencies - Jenkins controller
- Jenkins agents
- Docker agents
- Kubernetes agents - Faster builds
- Parallel builds
- Scaling CI pipelines - Build Docker images
- Push to DockerHub / ECR
- Docker agents
- Docker inside Jenkins - Global shared libraries
- Reusable pipeline functions
- Library structure - Archive artifacts
- Stash / unstash
- Upload artifacts to: - Artifactory - SonarQube (code quality)
- Trivy (container scanning)
- OWASP Dependency Check - Jenkins + Kubernetes
- Build Docker images
- Push to registry
- Deploy using: - Jenkins metrics plugin - Jenkins Home directory
- Backup strategies
- Disaster recovery - Jenkins YAML configuration
- Infrastructure as Code for Jenkins