SlideShare a Scribd company logo
JENKINS TUTORIAL
Mamun @mamunr7
What is Jenkins
The Big IDEA
Get something done automatically (hands-free) that involves:
Multiple Steps
Steps have dependencies
May have to execute multiple things on multiple servers
One Example of What You Can do with Jenkins
 At 3:21 on Sunday
 Get token from Vault using predefined authentication
variables (inserted by OPS)
 Login to Google Cloud using that token
 Copy 2TB of data from HDFS
 Process that data using a Python program
 Copy output to Google Dataflow
 If it fails or takes more than 60 minutes, page on-call using
Pagerduty plugin
 If it succeeds, send our team an email.
 Delete the token, because security does not allow tokens
to live outside Vault.
 Keep detailed logs for 30 last runs.
 Keep other metadata like run-times, also.
Another Example
 Grab new version of code from git repo
 Integrate it with maven or some other tool
 Deploy it to 500 servers
 Do some automated testing
 Decided if this new version is good or not
 If automated testing fails, roll the whole thing
back and page on-call
There are Other Comparable Tools
You Can Use Jenkins on AWS
(if you don’t fee like managing your own)
Installation
Java
Jenkins
Done 
Jenkins Architecture
 You can have many slaves
 Each slave can have labels
 Nothing except java is needed on
slaves
 Just a jar file that the master pushes
during agent installation
Login to Jenkins via your Favorite Browser
First Page You See (Your Mileage May Vary)
Manage Jenkins Screen
Build a New Job (Project)
Build a New Job (2)
Build a New Job (3)
Users
Roles
BUILD HISTORY
Job Status Summary of Each Recurring Job
Global Tool Configuration
How Many Plugins are There?
Plugins Management
Views
Doing simple things like execute a script on a server
Install a Slave Agent on a New VM
Sometimes This Happens After a Slave Reboot
Job Console Output
Each Job has its own space
Jenkins and Selenium Testing Tool (software) Work well together
Example of How Jenkins Enables CICD Pipelines
Multi-step Python Code Job on Jenkins
Kick off a Build Right Now

More Related Content

Jenkins tutorial