Lab 6
Lab 6
Agenda
●What is Jenkins ? Use ?
●What is Continuous Integration?
2
What is Continuous Integration ?
●Itis a development practice in which developers are required to commit changes to source code in
a shared repository several times a day.
●Every commit in the repository is then build and this allows the teams to detect problems early.
5
What is Continuous Delivery?
●Continuous delivery refers to the approach of ensuring that software can be released to production at any
time.
●Continuous delivery involves automating the entire software release process, including testing and deployment
to staging environments, but the actual release to production is still triggered manually.
6
Benefits of using CI to software development
1)Catch issues fast and help to fix problems earlier.
2)Everyone can see what’s happening.
3)Automate the build.
4)Continuous Integration leads to Continuous Deployment allowing us to deliver software more
rapidly.
8
What is Jenkins ? Use ?
Jenkins is an open source continuous integration/continuous delivery and deployment
●
(CI/CD) automation software DevOps tool written in the Java programming language.
● It is used to implement CI/CD workflows, called pipelines.
Jenkins is extremely powerful with vast amount of plug-in supported.
●
Jenkins server is a web dashboard which is nothing but powered from a war file, default
●
10
What makes Jenkins more powerful ?
They help extend Jenkins capabilities and integrated Jenkins with other software.
●
Plugins can be downloaded from the online Jenkins Plugin repository and loaded using
●
13
Jenkins Architecture
Jenkins Master Jenkins Slave
Your main Jenkins server is the Master. It hears requests from the Jenkins
And Master’s job is to handle scheduling Master instance.
build jobs.
Dispatching builds to the slaves for the Slaves can run on a variety of operating
actual execution. systems.
Monitor the slaves (possibly taking them The job of a Slave is to do as they are
online and offline as required). told to, which involves executing build
jobs dispatched by the Master.
A Master instance of Jenkins can also You can configure a project to always
execute build jobs directly. run on a particular Slave machine or a
particular type of Slave machine, or
simply let Jenkins pick the next available
Slave.
17
Task
Task 1 (3 Grades)
1- Install jenkins (optional: using docker image)
2- Complete configuration
3- Create admin user
4- Create a pipeline that executes and prints “Hello World”
Task 2 (7 Grades)
1- Create a bash script file that executes the “ls” command
2- Push the bash file into a newly created repo
3- Create a new pipeline item on jenkins
4- Create a CI/CD for this by configuring jenkins to pull the repo and execute the bash file
19