This document provides an overview of CI/CD with Jenkins. It defines continuous integration and continuous delivery, discusses the history and benefits of Jenkins, and covers Jenkins pipeline plugins. It also demonstrates how to build a basic pipeline in Jenkins and extend it by integrating Sonar code quality analysis prior to deployment.
2. 2
Senior Java Developer (10+ years experience)
Worked on a large scale of projects
- Frontend & Backend
Current Client (De Nederlandse Bank DNB)
Hobby’s
- Play Games, Watch Movies/Series, Walks, etc..
Father of two
Introduction
3. 3
Overview & Objective
Definition of CI/CD
History of Jenkins
Jenkins alternatives
Jenkins Pipeline Plugins
Build a mini Pipeline
Extend the mini Pipeline
6. 6
Continuous Integration
Continuous Integration (CI) is a
development practice that requires
developers to integrate code into a shared
repository several times a day. Each
check-in is then verified by an automated
build, allowing teams to detect problems
early.
7. 7
What are the benefits?
Reduce integration complexity
Catch issues early
Spend less time debugging
Stop waiting to find out if your code’s going to work
Continuous Integration
8. 8
Practices
Maintain a single source repository
Automate the build
Make your build self-testing
Keep the build fast
Everyone can see what’s happening
Automate deployment
Continuous Integration
9. 9
How do we do it? / Scenario
Dev: checkout source to local repository
Dev: commit changes to remote repository
CI: polling picks up changes
CI: build, run unit- & integration tests
CI: release & label software artifacts
CI: informs team of successful release
…
Continuous Integration
10. 10
How do we do it? / Scenario
CI: if the build/test fails it notifies the team
Dev: fixes the build & test as soon as possible
Dev: commit & push changes to the repository
CI: informs team on change/fix for broken build
Team: continue integration ritual build & test
Continuous Integration
11. 11
Team responsibilities
Team: check-in frequently
Team: don’t commit broken or untested code
Team: don’t check in when build is broken, fix first!
Team: don’t check-in & leave the
building!
Continuous Integration
15. 15
Continuous Deployment
Continuous Deployment (CD) is a software
development practice in which every code
change goes through the entire pipeline and is
put into production, automatically, resulting in
many production deployments every day.
18. 18
History of Jenkins
2004 – Known as the Hudson project lead by Sun
Microsystems
2005 – First release by Kohsuke Kawaguchi (founder)
2010 – Oracle buys Sun Microsystems
2011 – Oracle makes proposal to change the name of
Hudson to Jenkins
19. 19
Why Jenkins?
Jenkins has plenty of configuration options
Has a vibrant community of developers
Large library of plugins
Supports scripting languages like Groovy
Integration with many build tools Maven, Gradle, Ant..
Easy to install and free!
History of Jenkins
26. 26
Build Pipeline plugin
Jenkins Pipeline Plugins
Requires configuration of separate build jobs
Based on upstream/downstream jobs
Job configuration needs to be stored
34. 34
Why Jenkins Pipeline?
Powerful set of automation tools
- Code: Pipeline can now be checked into source control
- Durable: Survives Jenkins master restarts
- Pausable: Stop and wait for user input or approval
- Versatile: Supports fork/join, loop and parallel scenarios
- Extensible: Supports extensions to DSL and integration with other
plugins
Jenkins Pipeline Plugins
36. 36
Why Blue Ocean?
New Project that rethinks the user experience
Sophisticated visualization of CD Pipelines
Pipeline Editor (UI as a guide)
Personalization (Jenkins UI changes)
Pinpoint precision (where did it go wrong?)
Native integration for branches and pull requests
Jenkins Pipeline Plugins