0% found this document useful (0 votes)
14 views

20it911 Devops Unit 5

Uploaded by

3019 GOPIKA A
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

20it911 Devops Unit 5

Uploaded by

3019 GOPIKA A
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

1

2
Please read this disclaimer before proceeding:

This document is confidential and intended solely for the educational purpose of
RMK Group of Educational Institutions. If you have received this document through
email in error, please notify the system manager. This document contains proprietary
information and is intended only to the respective group / learning community as
intended. If you are not the addressee you should not disseminate, distribute or
copy through e-mail. Please notify the sender immediately by e-mail if you have
received this document by mistake and delete this document from your system. If
you are not the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this information is
strictly prohibited.

3
20IT911

DEVOPS

Department : Information Technology


Batch/Year : 2021-2025/ IV
Created by : Dr. R. Rajitha Jasmine

Date : 17-09-2024

4
1.TABLE OF CONTENTS

SLIDE
S.NO. CONTENTS
NO.
1 CONTENTS

2 COURSE OBJECTIVES

3 PRE REQUISITES (COURSE NAMES WITH CODE)

4 SYLLABUS (WITH SUBJECT CODE, NAME, LTPC DETAILS)

5 COURSE OUTCOMES (6)

6 CO- PO/PSO MAPPING

7 LECTURE PLAN –UNIT 5

8 ACTIVITY BASED LEARNING –UNIT 5


9 CROSSWORD PUZZLE
10 VIDEO LINK-QUIZ
11 TEST YOURSELF

12 LECTURE NOTES – UNIT 5

13 Jenkins - Setup and Configuration


14 Jenkins - Setup and Configuration

15 Continuous Integration

16 Continuous Delivery

17 Continuous Deployment Configuration

18 Continuous Deployment Configuration

19 CI CD Application,

20 Jobs

5
Table of Contents SLIDE
S.NO. CONTENTS
NO.

21 ASSIGNMENT 1- UNIT 5

22 PART A Q & A (WITH K LEVEL AND CO)

23 PART B Q s (WITH K LEVEL AND CO)

24 SUPPORTIVE ONLINE CERTIFICATION COURSES

REAL TIME APPLICATIONS IN DAY TO DAY LIFE AND TO


25
INDUSTRY

26 CONTENTS BEYOND THE SYLLABUS

27 ASSESSMENT SCHEDULE

28 PRESCRIBED TEXT BOOKS & REFERENCE BOOKS

29 MINI PROJECT SUGGESTIONS

6
2. COURSE OBJECTIVES

OBJECTIVES:
Understand the concepts of DevOps and the issues it resolves
Learn the DevOps tools set
Learn to Develop automation using Maven
Understand Continuous Delivery and Continuous Deployment
Understand Docker Containerization

7
3. PRE REQUISITES

PRE-REQUISITE CHART

DATA STRUCTURES
20IT911
DevOps

Software Engineering

Cloud Computing

8
4. DEVOPS SYLLABUS LTPC
3003
OBJECTIVES:
Understand the concepts of DevOps and the issues it resolves
Learn the DevOps tools set
Learn to Develop automation using Maven
Understand Continuous Delivery and Continuous Deployment
Understand Docker Containerization

UNIT I INTRODUCTION 6+6


What Is DevOps, Architecture, Life Cycle, Workflow and Principles,
Tools, CI, CD and CD Pipelines Linux Introduction, Basic Commands, Scripting

UNIT II TOOL SET 6+6

Maven Build Management, Goals, Profiles, Plugins, Life Cycles,


Configuration, Parent/Child - SCM Tools - GitHub, Init, CheckIn,
Merge, Pull, Push, Local and Remote Repo, Pull Request, Tagging
Strategy - Unit Testing - Unit Testing scropts -
Artifact Repository - Release Management aligned Repos, Private
and Public Repos
Monitoring - Tools like nagios to assist in monitoring and managing
the deployed instances

UNIT II TESTING AUTOMATION 6+6


Maven with Unit / Integration / Performance Testing - Report
Generation and Configuration

9
4. SOFTWARE ENGINEERING SYLLABUS LTPC
3003
UNIT IV DEPLOYMENT AND MONITORING - DOCKER 6+6

Docker Introduction, Images, Containers, Docker Hub, Links, Volume,


Network, Interactive Sessions - K8 - Single and Cluster Mode, Secrets,
Persistence Volume and Claim, Replica Factor, Services, Pods, Deployments,
logs, Kubernetes .

UNIT V DEPLOYMENT AND MONITORING - JENKINS 6+6

Sonar Qube integration with Project and Jenkins - Jenkins - Setup and
Configuration, Jobs - Continuous Integration, Continuous Delivery and
Continuous Deployment Configuration

TOTAL: 60 PERIODS

10
5.COURSE OUTCOME

Cognitive/
Affective Expected
Course Level of the
Course Outcome Statement Level of
Code Course Attainment
Outcome

Course Outcome Statements in Cognitive Domain

Understand the concepts of DevOps Apply


C305.1 60%
and the issues it resolves K3
Analyse
C305.2 Learn the DevOps tools set 60%
K4
Learn to Develop automation using Understand
C305.3 60%
Maven K2

Understand Continuous Delivery and Apply


C305.4 K3 60%
Continuous Deployment
Analyse
C305.5 Understand Docker Containerization 60%
K4
Understand the deployment process Apply
C305.6 60%
using Jenkins K3

Course Outcome Statements in Affective domain

C305.7 Attend the classes regularly Respond (A2) 95%

C305.8 Submit the Assignments regularly. Respond (A2) 95%


Participation in Seminar/Quiz/
Group Discussion/ Collaborative
C305.9 Valuing (A3) 95%
learning and content beyond
syllabus

11
6.CO-PO/PSO MAPPING

Correlation Matrix of the Course Outcomes to


Programme Outcomes and Programme Specific
Outcomes Including Course Enrichment Activities

Programme Outcomes (POs), Programme Specific Outcomes (PSOs)

P P P P P P P P P P P P PS PS PS
Course O O O O O O O O O O O O O O O
Outcomes 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3
(Cos)
K3
K K A
K4 K5 /K A2 A3 A3 A3 A3 A2 K3 K3 K3
3 5 3
5

K
C305.1 3 2 1 1 3 3 3 3 3
3

K
C305.2 4 3 3 2 2 3 3 3 3 3

K
C305.3 2 2 1 2 3 3 3

5
K
C305.4 3 2 1 1 3 3 3 3 3
3

K
C305.5 3 3 2 2 3 3 3 3 3
4

K
C305.6 3 3 2 1 1 3 3 2 2 2

A
C305.7 2 3

A
C305.8 2 2 2 3
2

A
C305.9 3 3 3 3 3 3

C305 3 3 2 2 3 1 1 1 3 3 3 3 3 3 3

12
UNIT 5

DEPLOYMENT AND
MONITORING - JENKINS

13
LECTURE PLAN – UNIT 3

UNIT I SOFTWARE PROCESS AND AGILE DEVELOPMENT

Sl.
No
PROPOSED ACTUAL
NO OF LECTURE LECTURE PERTAINI TAXONOMY MODE OF
TOPIC PERIO
NG CO(s) LEVEL DELIVERY
DS
PEROID PERIOD

1 Jenkins 1 CO1 K2 MD1

Setup and
1 CO1 K2 MD1
2 Configuration

Setup and
1 CO1 K2 MD1
3 Configuration

Jobs 1 CO1 K3 MD1


4

Continuous
1 CO1 K3 MD1
5 Integration

Continuous
6 1 CO1 K2 MD1
Delivery

Continuous
1 CO1 K2 MD1
7 Delivery

Continuous
1 CO1 K2 MD1
Deployment
8
Configuration
9 1 CO1 K2 MD1

14
LECTURE PLAN – UNIT 4

ASSESSMENT COMPONENTS MODE OF DELEIVERY


AC 1. Unit Test MD 1. Oral presentation
AC 2. Assignment MD 2. Tutorial
AC 3. Course Seminar MD 3. Seminar
AC 4. Course Quiz MD 4 Hands On
AC 5. Case Study MD 5. Videos
AC 6. Record Work MD 6. Field Visit
AC 7. Lab / Mini Project
AC 8. Lab Model Exam
AC 9. Project Review

15
ACTIVITY BASED LEARNING – UNIT 4

COMPLETE THE PUZZLES GIVEN BELOW

16
ACTIVITY BASED LEARNING – UNIT 5

QUIZ- LINK

Unit 5:
https://quizizz.com/admin/quiz/6417c38f432a57002135873c/devops?fro
mSearch=true&source=null

DEVOPS VIDEO link

https://youtu.be/slajN4ox7Eo?si=sCcz6AGsjvOBiimp

17
Test Yourself

1. When was DevOps introduced?


A) 1999 and 2000
B) 2003 and 2004
C) 2007 and 2008
D) 2010 and 2011

2 . Who is the father of DevOps?


A) Patrick Debois
B) Gene Kim
C) David Farley
D) Bridget Kravchenko
3 What is the full form of Devops?
A) Drive and Operations
B) Digital and Operations
C) Development And Operations
D) None of the above

4. Identify the tool for DevOps?


A) Monit
B) Nagios
C) Jenkins
D) All of the above

18
UNIT 5
DEPLOYMENT AND MONITORING - JENKINS

19
UNIT 5
DEPLOYMENT AND MONITORING - JENKINS
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.
Pipelines automate testing and reporting on isolated changes in a
larger code base in real time and facilitates the integration of
disparate branches of the code into a main branch. They also
rapidly detect defects in a code base, build the software, automate
testing of their builds, prepare the code base for deployment
(delivery), and ultimately deploy code to containers and virtual
machines, as well as bare metal and cloud servers. There are
several commercial versions of Jenkins. This definition only
describes the upstream open source project.
History
Jenkins is a fork of a project called Hudson, which was trademarked
by Oracle. Hudson was eventually donated to the Eclipse
Foundation and is no longer under development. Jenkins
development is now managed as an open source project under the
governance of the CD Foundation, an organization within the Linux
Foundation.
Continuous integration has evolved since its conception. Originally, a
daily build was the standard. Now, the usual rule is for each team
member to submit work, called a commit, on a daily (or more
frequent) basis and for a build to be conducted with each
significant change. When used properly, continuous integration
provides various benefits, such as constant feedback on the status
of the software. Because CI detects deficiencies early on in
development, defects are typically smaller, less complex and easier
to resolve

20
Jenkins
Jenkins and CI/CD
Over time, continuous delivery and deployment features have been
added to Jenkins. Continuous delivery is the process of automating
the building and packaging of code for eventual deployment to
test, production staging, and production environments. Continuous
deployment automates the final step of deploying the code to its
final destination.
In both cases, automation reduces the number of errors that occur
because the correct steps and best practices are encoded into
Jenkins. Jenkins describes a desired state and the automation
server ensures that that state is achieved. In addition, the velocity
of releases can be increased since deployments are no longer
bounded by personnel limitations, such as operator availability.
Finally, Jenkins reduces stress on the development and operations
team, by removing the need for middle of the night and weekend
rollouts.
Jenkins and micro services
The need for Jenkins becomes especially acute when deploying to
a microservices architecture. Since one of the goals of
microservices is to frequently update applications and services, the
ability to do so cannot be bounded by release bandwidth. More
and smaller services with faster update intervals can only be
achieved by the type of automation Jenkins provides.
Jenkins X
The Jenkins X project was formerly launched in 2018 with the goal
of creating a modern, cloud native Jenkins. It is also a project under
the guidance of the CD Foundation. Its architecture, technology
and pipeline language are completely different from Jenkins.
Jenkins X is designed for Kubernetes and uses it in its own
implementation. Other cloud native technology that Jenkins X uses
are Helm and Tekton.

21
How Jenkins works
Jenkins runs as a server on a variety of platforms including Windows,
MacOS, Unix variants and especially, Linux. It requires a Java 8 VM and
above and can be run on the Oracle JRE or OpenJDK. Usually, Jenkins
runs as a Java servlet within a Jetty application server. It can be run on
other Java application servers such as Apache Tomcat. More recently,
Jenkins has been adapted to run in a Docker container. There are read-
only Jenkins images available in the Docker Hub online repository.
To operate Jenkins, pipelines are created. A pipeline is a series of
steps the Jenkins server will take to perform the required tasks of the
CI/CD process. These are stored in a plain
text Jenkinsfile. The Jenkinsfile uses a curly bracket syntax that looks
similar to JSON. Steps in the pipeline are declared as commands with
parameters and encapsulated in curly brackets. The Jenkins server
then reads the Jenkinsfile and executes its commands, pushing the
code down the pipeline from committed source code to production
runtime. A Jenkinsfile can be created through a GUI or by writing code
directly.
Plugins
A plugin is an enhancement to the Jenkins system. They help extend
Jenkins capabilities and integrated Jenkins with other software.
Plugins can be downloaded from the online Jenkins Plugin repository
and loaded using the Jenkins Web UI or CLI. Currently, the Jenkins
community claims over 1500 plugins available for a wide range of
uses.
Plugins help to integrate other developer tools into the Jenkins
environment, add new user interface elements to the Jenkins Web UI,
help with administration of Jenkins, and enhance Jenkins for build and
source code management. One of the more common uses of plugins
is to provide integration points for CI/CD sources and destinations.
These include software version control systems (SVCs) such as Git and
Atlassian BitBucket, container runtime systems -- especially Docker,
virtual machine hypervisors such as VMware vSphere, public cloud
instances including Google Cloud Platform and Amazon AWS, and
private cloud systems such as OpenStack. There are also plugins that
assist in communicating with operating systems over FTP, CIFS, and
SSH.

22
Security
Jenkins security revolves around securing the server and the user.
Server security is achieved in the same way any other server is
secured. Access to where it resides, such as a VM or bare metal
server, is configured to allow for the fewest number of processes to
communicate with the server. This is accomplished through typical
server OS and networking security features.
In addition, access to the server via the Jenkins UI is similarly
limited to the fewest number of users using standard techniques
such as multifactor authentication. This can be accomplished by
using the user security features of the HTTP server in use for the
UI.
Jenkins also supports security for its internal user database. These
features are accessed via the Jenkins Web UI. Jenkins supports two
security realms: the Security Realm and the Authorization Realm.
The Security Realm allows an operator to decide who has access to
Jenkins and the Authorization Realm determines what they can do
with that access.
Advantages and disadvantages
As is the case with most software, there are pros and cons to
Jenkins. One of the advantages of Jenkins is that it can be
extended using plugins. This makes Jenkins adaptable to changes in
IT environments. Plugins also contribute to the flexibility of Jenkins,
as does the rich scripting and declarative languages that allow for
highly custom pipelines. Since Jenkins is highly unopinionated, it
fits well into most environments, including complex hybrid and
multi-cloud systems.
Jenkins has been around much longer than other solutions in this
space. This, plus its flexibility, has led to it being widely deployed.
For this reason, Jenkins is well understood, with a broad knowledge
base, extensive documentation, and abundant community
resources. These resources make it easier to install, manage and
troubleshoot Jenkins installation.
Finally, Jenkins and its plugins are built on Java. Java is a proven
enterprise development language with a broad ecosystem. This
places Jenkins on a solid base that can be extended using common
design patterns and frameworks.

23
Continuous Delivery is a process, where code changes are
automatically built, tested, and prepared for a release to
production. I hope you have enjoyed my previous blogs on
Jenkins. Here, I will talk about the following topics:
What is Continuous Delivery?
Types of Software Testing
Difference Between Continuous Integration, Delivery, and
Deployment
What is the need for Continuous Delivery?
Hands-on Using Jenkins and Tomcat
Let us quickly understand how Continuous Delivery works.
What Is Continuous Delivery?
It is a process where you build software in such a way that it can be
released to production at any time. Consider the diagram below:

24
Different types of testing.

Automated build scripts will detect changes in Source Code


Management (SCM) like Git.
Once the change is detected, source code would be deployed to a
dedicated build server to make sure build is not failing and all test
classes and integration tests are running fine.
Then, the build application is deployed on the test servers (pre-
production servers) for User Acceptance Test (UAT).
Finally, the application is manually deployed on the production
servers for release.
Types of Software Testing
Broadly speaking there are two types of testing:
Blackbox Testing: It is a testing technique that ignores the internal
mechanism of the system and focuses on the output generated
against any input and execution of the system. It is also called
functional testing. It is basically used for validating the software.
Whitebox Testing: is a testing technique that takes into account the
internal mechanism of a system. It is also called structural testing
and glass box testing. It is basically used for verifying the software.
There are two types of testing, that falls under this category.
Unit Testing: It is the testing of an individual unit or group of
related units. It is often done by the programmer to test that the
unit he/she has implemented is producing expected output against
given input.
Integration Testing: It is a type of testing in which a group of
components are combined to produce the output. Also, the
interaction between software and hardware is tested if software
and hardware components have any relation. It may fall under both
white box testing and black box testing.

25
There are multiple tests that fall under this category. I will focus on
a few, which are important for you to know, in order to understand
this blog:
Functional/ Acceptance Testing: It ensures that the specified
functionality required in the system requirements works. It is done
to make sure that the delivered product meets the requirements
and works as the customer expected
System Testing: It ensures that by putting the software in different
environments (e.g., Operating Systems) it still works.
Stress Testing: It evaluates how the system behaves under
unfavorable conditions.
Beta Testing: It is done by end users, a team outside development,
or publicly releasing full pre-version of the product which is known
as a beta version. The aim of beta testing is to cover unexpected
errors. Differences between Continuous Integration, Delivery, and
Deployment
Visual content reaches an individual's brain in a faster and more
understandable way than textual information. So I am going to
start with a diagram which clearly explains the difference:
In Continuous Integration, every code commit is built and tested,
but, is not in a condition to be released. I mean the build
application is not automatically deployed on the test servers in
order to validate it using different types of Blackbox testing like -
User Acceptance Testing (UAT).
In Continuous Delivery, the application is continuously deployed on
the test servers for UAT. Or, you can say the application is ready to
be released to production anytime. So, obviously Continuous
Integration is necessary for Continuous Delivery.
Continuous Deployment is the next step past Continuous Delivery,
where you are not just creating a deployable package, but you are
actually deploying it in an automated fashion.
In simple terms, Continuous Integration is a part of both
Continuous Delivery and Continuous Deployment. And Continuous
Deployment is like Continuous Delivery, except that releases
happen automatically.

26
Continuous Delivery Pipeline Using Jenkins
We will be using Jenkins to create a Continuous Delivery Pipeline, which will
include the following tasks:
Steps Involved in the Demo
Fetching the code from GitHub
Compiling the source code
Unit testing and generating the JUnit test reports
Packaging the application into a WAR file and deploying it on the Tomcat
serve
Step 1 — Compiling the Source Code
Let's begin by first creating a Freestyle project in Jenkins.
Give a name to your project and select Freestyle Project:
When you scroll down you will find an option to add source code repository,
select "git" and add the repository URL; in that repository, there is a
pom.xml fine which we will use to build our project. Consider the below
screenshot:
Now we will add a Build Trigger. Pick the poll SCM option, basically, we will
configure Jenkins to poll the GitHub repository after every 5 minutes for
changes in the code. Consider the below screenshot:
Before I proceed, let me give you a small introduction to the Maven Build
Cycle.
Each of the build lifecycles is defined by a different list of build phases,
wherein a build phase represents a stage in the lifecycle.
Following is the list of build phases:
validate — validate the project is correct and all necessary information is
available
compile — compile the source code of the project
test — test the compiled source code using a suitable unit testing
framework. These tests should not require the code be packaged or
deployed
package — take the compiled code and package it in its distributable format,
such as a JAR.
verify — run any checks on results of integration tests to ensure quality
criteria are met
install — install the package into the local repository, for use as a
dependency in other projects locally
deploy — done in the build environment, copies the final package to the
remote repository for sharing with other developers and projects.

27
We can run the below command, for compiling the source code,
unit testing and even packaging the application in a war file:
mvn clean package
We can also break down your build job into a number of build
steps. This makes it easier to organize builds in clean, separate
stages.
So we will begin by compiling the source code. In the build tab,
click on invoke top level maven targets and type the below
command:
compile
This will pull the source code from the GitHub repository and will
also compile it (Maven Compile Phase).
Click on Save and run the project.
Now, click on the console output to see the result.
Now we will create one more Freestyle Project for unit testing.

28
Add the same repository URL in the source code management tab, like we
did in the previous job.
Now, in the "Build Trigger" tab click on the "build after other projects are
built". There type the name of the previous project where we are compiling
the source code, and you can select any of the below options:
Trigger only if the build is stable
Trigger even if the build is unstable
Trigger even if the build fails
The above options are pretty self-explanatory so, select any one. Consider
the below screenshot:
In the Build tab, click on invoke top level maven targets and use the below
command:
test
Jenkins also does a great job of helping you display your test results and test
result trends.
The de facto standard for test reporting in the Java world is an XML format
used by JUnit. This format is also used by many other Java testing tools, such
as TestNG, Spock, and Easyb. Jenkins understands this format, so if your
build produces JUnit XML test results, Jenkins can generate nice graphical
test reports and statistics on test results over time, and also let you view the
details of any test failures. Jenkins also keeps track of how long your tests
take to run, both globally, and per test-this can come in handy if you need to
track down performance issues.
So the next thing we need to do is to get Jenkins to keep tabs on our unit
tests.
Go to the Post-build Actions section and tick "Publish JUnit test result
report" checkbox. When Maven runs unit tests in a project, it automatically
generates the XML test reports in a directory called surefire-reports. Enter
"**/target/surefire-reports/*.xml" in the "Test report XMLs" field. The two
asterisks at the start of the path ("**") are a best practice to make the
configuration a bit more robust: they allow Jenkins to find the target
directory no matter how we have configured Jenkins to check out the source
code.
**/target/surefire-reports/*.xml
Again, save it and click on Build Now.
Now, the JUnit report is written to
/var/lib/jenkins/workspace/test/gameoflife-core/target/surefire-
reports/TEST-behavior.
In the Jenkins dashboard, you will also notice the test results:
Step 3 — Creating a WAR File and Deploying on the Tomcat Server
Now, the next step is to package our application in a WAR file and deploy
that on the Tomcat server for User Acceptance test.

29
Create one more freestyle project and add the source code repository
URL.
Then in the build trigger tab, select build when other projects are built,
consider the below screenshot:
Basically, after the test job, the deployment phase will start
automatically.
In the build tab, select shell script. Type the below command to
package the application in a WAR file:
mvn package
Next step is to deploy this WAR file to the Tomcat server. In the "Post-
Build Actions" tab select deploy war/ear to a container. Here, give the
path to the war file and give the context path.
Select the Tomcat credentials and, notice the above screenshot. Also,
you need to give the URL of your Tomcat server.
In order to add credentials in Jenkins, click on credentials option on the
Jenkins dashboard.
Click on System and select global credentials.
Then you will find an option to add the credentials. Click on it and add
credentials.
Add the Tomcat credentials, consider the below screenshot
Click on OK.
Now, in your Project Configuration, add the tomcat credentials which
you have inserted in the previous step.
Click on Save and then select Build Now.
Go to your tomcat URL, with the context path, in my case it is
http://localhost:8081. Now add the context path in the end,
1
Link - http://localhost:8081/gof
I hope you have understood the meaning of the context path.
Now, to create a pipeline view,
Click on the plus icon to create a new view.
Configure the pipeline the way you want:

30
I did not change anything apart from selecting the initial job. So my
pipeline will start from compile. Based on the way I have configured
other jobs, after compile testing and deployment will happen.
Finally, you can test the pipeline by clicking on RUN. After every five
minutes, if there is a change in the source code, the entire pipeline
will be executed.
Now we are able to continuously deploy our application on the test
server for user acceptance tests (UAT).

While standard Jenkins “freestyle” jobs support simple continuous


integration by allowing you to define sequential tasks in an
application lifecycle, they do not create a persistent record of
execution, enable one script to address all the steps in a complex
workflow, or confer the other advantages of pipelines.
In contrast to freestyle jobs, pipelines enable you to define the whole
application lifecycle. Pipeline functionality helps Jenkins to support
continuous delivery (CD). The Pipeline plugin was built with
requirements for a flexible, extensible, and script-based CD workflow
capability in mind.
Accordingly, pipeline functionality is:
Durable: Pipelines can survive both planned and unplanned restarts
of your Jenkins controller.
Pausable: Pipelines can optionally stop and wait for human input or
approval before completing the jobs for which they were built.
Versatile: Pipelines support complex real-world CD requirements,
including the ability to fork or join, loop, and work in parallel with
each other.
Efficient: Pipelines can restart from any of several saved checkpoints.
Extensible: The Pipeline plugin supports custom extensions to its DSL
(domain scripting language) and multiple options for integration with
other plugins.
The flowchart below is an example of one continuous delivery
scenario enabled by the Pipeline plugin:

31
Jenkins Workflow

Pipeline Defined
Pipelines are Jenkins jobs enabled by the Pipeline (formerly called
“workflow”) plugin and built with simple text scripts that use a
Pipeline DSL (domain-specific language) based on the Groovy
programming language.
Pipelines leverage the power of multiple steps to execute both
simple and complex tasks according to parameters that you
establish. Once created, pipelines can build code and orchestrate
the work required to drive applications from commit to delivery.

32
Pipeline Vocabulary
Pipeline terms such as “step,” “node,” and “stage” are a subset of the
vocabulary used for Jenkins in general.
Step
A “step” (often called a “build step”) is a single task that is part of
sequence. Steps tell Jenkins what to do.
Node
In pipeline coding contexts, as opposed to Jenkins generally,a “node” is a
step that does two things, typically by enlisting help from available
executors on agents:
Schedules the steps contained within it to run by adding them to the
Jenkins build queue (so that as soon as an executor slot is free on a node,
the appropriate steps run).
Creates a workspace, meaning a file directory specific to a particular job,
where resource-intensive processing can occur without negatively
impacting your pipeline performance. Workspaces last for the duration
of the tasks assigned to them.
(In Jenkins generally, a “node” means any computer that is part of your
Jenkins installation, whether that computer is used as a controller or as
an agent).
Stage
A “stage” is a step that calls supported APIs. Pipeline syntax is comprised
of stages. Each stage can have one or more build steps within it.
Familiarity with Jenkins terms such as “controller,” “agent”, and
“executor” also helps with understanding how pipelines work. These
terms are not specific to pipelines:
controller - A “controller ” is the basic installation of Jenkins on a
computer; it handles tasks for your build system. Pipeline scripts are
parsed on controllers, and steps wrapped in node blocks are performed
on available executors.
agent - An “agent” (formerly "slave") is a computer set up to offload
particular projects from the controller. Your configuration determines the
number and scope of operations that an agent can perform. Operations
are performed by executors.
executor - An “executor” is a computational resource for compiling code.
It can run on controller or agent machines, either by itself or in parallel
with other executors. Jenkins assigns a java.lang.Thread to each
executor.

33
Creating a Simple Pipeline
Initial pipeline usage typically involves the following tasks:
Downloading and installing the Pipeline plugin (Unless it is already
part of your Jenkins installation)
Creating a Pipeline of a specific type
Configuring your Pipeline
Controlling Flow through your Pipeline
Scaling your Pipeline
To create a simple pipeline from the Jenkins interface, perform the
following steps:
Click New Item on your Jenkins home page, enter a name for your
(pipeline) job, select Pipeline, and click OK.
In the Script text area of the configuration screen, enter your pipeline
syntax. If you are new to pipeline creation, you might want to start by
opening the Snippet Generator and selecting the “Hello World”
snippet. Note: Pipelines are written as Groovy scripts that tell Jenkins
what to do when they are run, but because relevant bits of syntax are
introduced as needed, you do not need to be a Groovy expert to
create them, although basic understanding of Groovy is helpful.
Check the Use Groovy Sandbox option below the Script text
area. Note: If you are a Jenkins administrator (in other words,
authorized to approve your own scripts), sandboxing is optional but
efficient, because it lets scripts run without approval as long as they
limit themselves to operations that Jenkins considers inherently safe.
Click Save.
Click Build Now to create the pipeline.
Click ▾ and select Console Output to see the output.
The following example shows a successful build of a pipeline created
with a one-line script that uses the “echo” step to output the phrase,
“hello from pipeline:”

34
Started by user anonymous[Pipeline]
Echo hello from Pipeline[Pipeline]
End of Pipeline
Finished: SUCCESS
Note: You can also create complex and multi-branch pipelines in
the script entry area of the Jenkins configuration page, but because
they contain multiple stages and the configuration page UI provides
limited scripting space, pipeline creation is more commonly done
using an editor of your choice from which scripts can be loaded
into Jenkins using the Pipeline script from SCM option.

What is Jenkins?
Jenkins is an open-source automation server that is widely used to
set up CI/CD workflows. CI/CD is a modern software delivery
approach that decreases time to market. In a typical CI/CD setup,
the following steps ensure that well-tested code is automatically
deployed to a production machine, without manual effort:
A developer pushes code to a shared branch.
The CI/CD tool moves the code to a test environment.
The code is compiled. A suite of test cases is executed to validate
the new changes and perform regression testing.
If the code passes testing, it’s moved to the main repository.
The code is packaged and deployed to the production server.
Jenkins has built-in functionality and native plug-ins that support all
the above and more. Whether you want to write a 100-step
deployment script, compile code against every Git commit,
calculate unit-test coverage on the fly, or identify bugs and
vulnerabilities before merging code, Jenkins is the way to go.

35
What is a Jenkins job?
A job in Jenkins is a user-specified description of work, typically divided
into sequential steps. For example, a job may fetch source code from a
Git repository, compile it using the configured compiler, run it inside a
staging environment, examine the output for any errors, and send an
email notification to the user.
Jenkins offers different types of jobs to handle most business use
cases. The most commonly used job types are:
Freestyle project: This type is a primary component of the Jenkins
ecosystem. It’s highly flexible and includes both build steps and post-
build actions. For example, you can add a build step to execute a shell
script, execute Windows batch command, start/stop Docker
containers, and more.
Pipeline: A pipeline defines a series of events or jobs that can be used
to set up CI/CD workflows. More on pipelines in the next section.
Multi-configuration project: This job type is suitable for projects that
contain various configuration sets. For example, you may need to
compile code for different architectures or test code on different
environments.

36
What is a Jenkins pipeline?
A Jenkins pipeline is a set of plug-ins to create automated,
recurring workflows that constitute CI/CD pipelines. A Jenkins
pipeline includes all the tools you need to orchestrate testing,
merging, packaging, shipping, and code deployment.
A pipeline is typically divided into multiple stages and steps, with
each step representing a single task and each stage grouping
together similar steps. For example, you may have “Build”, “Test”,
and “Deploy” stages in your pipeline. You can also run existing jobs
within a pipeline.
Pipelines offer several benefits. You can:
Fast-track the delivery of code to production
Automate build generation for pull requests, ensuring no syntax
errors are merged to the main branch/repository
Perform automated unit, sanity, and regression testing
Create customized automation workflows for different clients,
environments, or products.
Ensure security best practices are followed by performing static
code analysis, vulnerability scanning, and penetration testing on
every commit
Reduce the need for manual maintenance, testing, and
deployment, allowing your developers and DevOps engineers to
focus on more productive tasks
The code that defines a pipeline is written inside a text file, known
as the Jenkinsfile. The pipeline-as-code model recommends
committing the Jenkinsfile to the project source code repository.
This way, a pipeline is modified, reviewed, and versioned like the
rest of the source code.

37
Example Jenkins application
Jenkins is an open-source automation tool for Continuous
Integration (CI) and Continuous Deployment (CD). It is a server-
based system that runs in servlet containers like Apache Tomcat.
Jenkins is one of the most used DevOps tools used along with
other cloud-native tools and allows developers to build, test and
deploy software seamlessly.
Prepare Your System
Before moving on to Jenkin installation, make your system ready.
You can use an Azure Virtual Machine, AWS Instance or any other
cloud service. We will use Azure Virtual Machine in this blog. Most
configuration steps will be the same in all clouds, but you can also
use Azure VM to follow the steps with us for better understanding.
Step 1) Create your Virtual Machine in Azure and pick the
operating system that suits you best. Generally, Ubuntu is preferred
more, and we will be using the same.
You can refer to this blog for a detailed VM installation
guide: Create and Connect Ubuntu Virtual Machine in Azure.
Step 2) After creation, connect to your Virtual Machine. From here,
we will assume that you have already created and logged in to your
system successfully

38
Step 3) Open your Virtual Machine in Azure and search for networking
settings in the search bar, shown in the image below. Here you need to
add one Inbound Port Rule, so click on the highlighted button.

Step 4) Leave the default setting in the window and check for the
destination port ranges. Confirm the port number is 8080, as
highlighted in the image below. Now, add this rule, and it will be used
in the upcoming steps to run Jenkins. Similarly, create one more port
number, 8090 and update the default name of this port to avoid
conflicts. We will use this port to access the Tomcat and the webpage
in the upcoming steps.

Download and Install Jenkins


After making your system ready, log in to your system and proceed
with Jenkins installation.
There are two types of Jenkins release available:
Stable (LTS): This release is fully stable, bug-free and released in the
long term.
Regular (Weekly): It is released rapidly with new features weekly.
For more information on Jenkins, visit the official Jenkins download
guide here: Download Jenkins.
Step 1) First of all, you need to install Java in your system. Install the
default JDK by using the below command on your system.
sudo apt updatesudo apt install default-jdk Step 2) Now, run the below
commands one by one to install the Jenkins stable version.
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo
apt-key add -sudo sh -c 'echo deb https://pkg.jenkins.io/debian-
stable binary/ > /etc/apt/sources.list.d/jenkins.list'sudo apt-get
updatesudo apt-get install jenkins
Step 3) To check whether the Jenkins is now active or not, run the
below command. It will show status Active if the Jenkins is
appropriately installed.
sudo systemctl status jenkins

39
Start and ConfigureJenkins
Before creating CI CD Pipeline using Jenkins, we need to start and
configure Jenkins with the following steps.
Step 1) Copy your public IP address from your virtual machine in Azure,
as shown in the image below.

Step 2) We have already added port number 8080 in the previous steps
while preparing our system. So, we can access our Jenkins in the
browser using the URL format as http://youripaddress:8080.
Step 3) Jenkins window will appear on your screen. You need to enter
the administrator password to access Jenkins, available at the
highlighted location, as shown in the above image. To fetch the pass,
you need to go back to your Jenkins server and use the below code with
the highlighted location. Copy the pass that will appear on your screen
after running the below code and paste it on the password field.
sudo cat /var/lib/jenkins/secrets/initialAdminPassword Step 4) After
successful login, you will be asked to select the plugin installation type.
Select the ‘Install suggested plugins‘ tab to install all the needed plugins
automatically.

Step 5) It will take few minutes to install all the plugins. Now, Jenkins
will ask you to add a new admin user. Fill in all the details and keep it
safe as it will be used to login back to your Jenkins. Click on all the finish
buttons coming up ahead, and you will get successfully logged in to
your Jenkins dashboard.

Step 6) Now, we need to specify the Java location to Jenkins. Go back to


your server command prompt and use the code below to fetch the
directory of Java. Multiple directories will be listed using the below
code. In our case, the directory is: ‘/usr/lib/jvm/java-11-openjdk-
amd64/bin/java’.
find / -type f -name java
Step 6) Copy the above location and go back to your Jenkins Dashboard.
Look for Global Tool Configuration under the Manage Jenkins menu

40
Step 7) Unselect the Install automatically button from the JDK
window and fill the fields. Paste the java location path and trim it
as shown in the image below. In the below Git window, select the
install automatically checkbox.
Step 8) Similarly, check the box for Maven and fill the name field.
Save all the settings, and now the configuration of Jenkins is
completed.
Create CI/CD Pipeline Jenkins
We can now start creating pipelines using Jenkins after all the
configuration and setup.
Continuous Integration
Step 1) Create New Item, select Freestyle Project and provide a
name to your item.
Step 2) Switch to the Source Code Management window and paste
your Github repository link. Specify your branch name of the
repository below and Save it.
[Note: The above-linked Github repository
‘gihub.com/subu123321/hello-world‘ contains a ‘pom.xml‘ file used
for Java compilation and generates a web app. It will be deployed
to the server]
Step 3) Now click on Build Now button from the menu. With this
step, all the repository files will be fetched by Jenkins. Click on
Configure to go back to the same settings page.
Step 4) Click on Build Tab and select build step as ‘Invoke top-level
Maven targets‘.
Step 5) Select your maven name from the drop-down menu. Fill
the goals with the multiple jobs you need to perform and separate
them with one space. These goals are available in your repository,
and you need to invoke them using Maven. Save it and again click
on the ‘Build Now‘ button from the menu as we did in the previous
steps. Now the maven commands will be executed that will
generate a war file.

41
Step 6) If you want to check the war file created in the previous
steps, visit the workspace on your Jenkins dashboard or just run
the directory commands in your server. Your directories and
project name can vary, so you can use the ‘ls‘ command to see the
list inside that directory and also keep in mind the directory name
is case sensitive.
cd /var/lib/jenkins/workspace/lscd /Democd /webapp/target Step
7) Now go back to Configure and visit the ‘Post Build Actions‘ tab.
Click the drop-down and select ‘Archive the Artifacts‘ from the
options. In the field, write down ‘**/*.war‘ as shown in the image
below. It will fetch all the directories and get the war file wherever
it is present. Click again on Build Now button, and you will now see
the Artifacts in the Jenkins dashboard.
Continuous Deployment
Step 8) We need to install Apache Tomcat, and for this, you need to
visit the Tomcat Download page. In the core section, hover over
the ‘tar.gz’ link and copy it. Now, use the below commands in your
server one by one.
First, four commands will create one temporary directory and user
group to access the file. Here, use the command curl -O ‘paste
tomcat download link‘ as shown in the command below.
Use further commands to create a tomcat directory and extract the
gzip file. Just cross-check the version number of the Tomcat that
you are downloading and extracting.
Now the permission of the files needs to be configured with the
below commands. In the last command, replace it with your
username by which you are accessing the server.
sudo groupadd tomcatsudo useradd -s /bin/false -g tomcat -d
/opt/tomcat tomcatcdcd /tmp

42
curl -O https://dlcdn.apache.org/tomcat/tomcat-
9/v9.0.54/bin/apache-tomcat-9.0.54.tar.gzsudo mkdir
/opt/tomcatsudo tar xzvf apache-tomcat-9.0.54.tar.gz -C
/opt/tomcat --strip-components=1 cd /opt/tomcatsudo chgrp -
R tomcat /opt/tomcatsudo chmod -
R g+r confsudo chmod g+x confcd ..sudo chown -R
jenkinsuser:jenkinsuser tomcat/ Step 9) We need to update the
port number from 8080 to 8090 in the server.xml file. We are
updating it as this port number is already in use by Jenkins, and we
have created 8090 in Azure VM for Tomcat. Use the below
commands to edit the file. When you enter the file, click
the INSERT button to edit. Now search for a similar code, as shown
in the image below. Update the port number to 8090. To save the
file, press the Esc key, type :wq and click on Enter button.
Cd
cd /opt/tomcat/confvi server.xml
Step 10) Similarly, we need to edit the ‘tomcat-users.xml’ file to
update the roles that enable us to deploy files using Tomcat. In the
file before tomcat-users ending code, paste the below roles code.
To save the file press, the Esc key, type :wq and press Enter.
cdcd /opt/tomcat/confvi tomcat-
users.xml <role rolename="manager-
gui"/> <role rolename="manager-
script"/> <role rolename="manager-
jmx"/> <role rolename="manager-
status"/> <user username="admin" password="admin" roles="man
ager-gui, manager-script, manager-jmx, manager-
status"/> <user username="deployer" password="deployer" roles=
"manager-script"/>
<user username="tomcat" password="s3cret" roles="manager-
gui"/>
Step 11) We also need to update the context.xml file to remove the
IP restriction. Use the same steps to edit the file with the below
commands. Remove all the content present inside ‘context‘ as
shown in the image below and save it.
cdcd /opt/tomcat/webapps/manager/META-INFvi context.xml

43
Step 12) Now, all the files are edited successfully. To update the
Tomcat, we need to restart the system to accept all our changes.
Use the below commands in the server for shutdown and startup
of Tomcat. With this step, Tomcat is ready to deploy our container.
cd cd /opt/tomcat/bin/./shutdown.sh./startup.sh Step 13) In the
Jenkins Dashboard, click on Manage Jenkins and then visit Manage
Plugins.
Step 14) Click on the Available tab and search for the ‘Deploy to
Container‘ plugin. Select the plugin and click on the ‘Install without
restart‘ button.
Step 15) Go back to your Configure window and select the Post-
build Actions tab. Select the ‘Add post-build action‘ drop-down
button and select the ‘Deploy war/ear to a container‘ plugin. Fill
the same path of your war file here, as shown in the image below.
Step 16) Now click on the ‘Add Container‘ button and select the
‘Tomcat 9.x Remote‘ as we are using version 9 of the Tomcat. Fill in
the URL of the same virtual machine with the new port
number 8090. On the credentials drop-down button, select
Jenkins.
Step 17) In this window, fill in the username and password that we
have used in the ‘tomcat-users.xml‘ file (in Step 10). Fill in the ID,
description and click on the button ‘Add‘.
Step 18) Click on the credentials drop-down button and select the
recently created credential. Save all the settings and again click on
the ‘Build Now‘ button from the Jenkins dashboard. If the Build is
successful, the war file will get deployed.
Final Step) Visit the address of your virtual machine, and you will
see your deployment on the page. In our case, the URL is
‘52.139.207.89:8090/webapp/‘ with port number 8090 that we
created for Tomcat.

44
How Jenkins works? Jenkins Architecture

45
Jenkins Architecture
Jenkins is continuous integration tools which help to integrate other
tools to automate the software development activity and repetitive
tasks. Jenkins has 2 releases. One, Community version which open
source and free and another one is Jenkins Enterprise which is from
Cloud bees for enterprise. Jenkins is extremely powerful with vast
amount of plug-in supported. Jenkins is one of the most active open
source projects so learning and finding the information is easily
available on the internet. Jenkins uses master/slave architecture to
manage distributed builds.
Jenkins Architecture
Jenkins Architecture is based on the distributed. This has 2
components.
Jenkins Server
Jenkins Node/Slave/Build Server
Jenkins server is a web dashboard which is nothing but powered from
a war file, default run on 8080 ports. Using Dashboard, You can
configure the Jobs/Projects but the build takes place in Nodes/Slave.
By default one Nodes/Slave is configured and running in Jenkins
Server. You can add more Nodes/Slave as well using IP address, user
name, Password using the ssh/jnlp/webstart methods.
Your main Jenkins server is the master. In short, the master’s job is to
handle scheduling build jobs, dispatching builds to the slaves for the
actual execution, monitor the slaves (possibly taking them online and
offline as required) and recording and presenting the build results.
Even in a distributed architecture, a master instance of Jenkins can
also execute build jobs directly.
The job of the slaves is to do as they are configured in the Jenkins
Server, which involves executing build jobs dispatched by the master.
You can configure a project to always run on a particular slave
machine or a particular type of slave machine, or simply let Jenkins
pick the next available slave.
Jenkins is developed using Java and Java is platform-independent thus
Jenkins servers and nodes/slaves can be configured in any servers
including Windows, Linux, and Mac.

46
Part A
How do I decide which Jenkins plugins to install for my pipeline?
The choice of Jenkins plugins depends on your project's specific needs.
Consider factors such as the programming languages used, version
control systems, build tools, and testing frameworks. Jenkins provides a
wide range of plugins to integrate with these tools, so choose the ones
that best suit your project.
Can I use Jenkins with cloud-based development environments?
Yes, Jenkins can be used with cloud-based development environments.
It can be configured to build and deploy applications hosted on cloud
platforms like AWS, Azure, Google Cloud, and others.
Can I use Jenkins for both small and large projects?
Yes, Jenkins is versatile and can be used for projects of all sizes.
Whether you're working on a small personal project or a large
enterprise-level application, Jenkins can be scaled to meet your needs.
I'm concerned about security. How can I ensure my Jenkins CI/CD
pipeline is secure?
Security is a top priority. You can enhance security by implementing
role-based access control (RBAC) in Jenkins, ensuring that only
authorized users have access. Additionally,regularly update Jenkins and
plugins to address any security vulnerabilities.
What if my Jenkins pipeline fails during a critical deployment? How
can I prevent this?
To prevent critical failures, implement approval gates in your Jenkins
pipeline. For instance, require manual approval before deploying to
production. This gives you an opportunity to review and test changes
thoroughly before they go live.
I'm new to Jenkins and CI/CD. How can I quickly get started?
Start with Jenkins' official documentation and online tutorials. Jenkins
has a vast community and numerous resources available. You can also
join forums and discussion groups to seek guidance and best practices
from experienced Jenkins users.
Is Jenkins the only tool available for creating CI/CD pipelines?
No, there are several tools available for creating CI/CD pipelines,
including Jenkins, Travis CI, CircleCI, GitLab CI/CD, and more. The choice
of tool depends on your project's requirements and preferences.

47
Part B

Explain a plugin in Jenkins and its importance?

Explain the process to configure Jenkins nodes?

Explain how to use Jenkins for continuous integration and continuous delivery.

Explain the stage in a Jenkins pipeline and its usage.

Explain the working of Jenkins with neat diagram

Explain how Jenkins works between Continuous Integration, Continuous Delivery, and Continuous
Deployment?

Explain the set up and configuration process with Jenkins

Discuss the architecture of Jenkins

Explain the workflow process of Jenkins and how to handle configuration

Describe the stages of Jenkins pipeline between Continuous Integration, Continuous Delivery, and
Continuous Deployment?

48
Explain the Jenkins use to test and build Android applications?

Explain how Jenkins can be used to build and test microservices?

Explain how Jenkins is used to build and test containers?

Explain Jenkins Pipeline as Code? How to use Jenkins Pipelineas code?

Explain the process Jenkins uses to deployupdates to an existing application

How to organize Jenkins jobs?

Explain how to integrate Kubernetes with Jenkins.

How can you integrate Git with Jenkins?

How to configure Third-party tools in Jenkins?

49
SUPPORTIVE ONLINE COURSES – UNIT 5

https://infyspringboard.onwingspan.com/web/en/app/toc/lex_aut
h_01384407036916531249279_shared/overview

50
REAL TIME APPLICATION- UNIT 5

Develop CI/CD Implementation for a Retail shop

Explain the Case study on CI/CD Implementation for a Smart Retail Digital
Signage Solution

Explain the Case study on Jenkins Implementation for a online shopping


Website

51
CONTENT BEYOND SYLLABUS – UNIT 5

SOFTWARE PROJECT MANAGEMENT


Software project management refers to the branch of project management
dedicated to the planning, scheduling, resource allocation, execution, tracking and
delivery of software and web projects.

Project management in software engineering is distinct from traditional project


management in that software projects have a unique lifecycle process that
requires multiple rounds of testing, updating, and customer feedback. Most IT-
related projects are managed in the agile style, in order to keep up with the
increasing pace of business, and iterate based on customer and stakeholder
feedback.

ProWorkflow
ProWorkflow is a web-based project management software that enables users to
manage tasks and projects, track time, organize contacts, and generate reports for
their business. It is a productivity application that provides a comprehensive set of
features, yet still easy to use for all members of the team. Aside from the great tools
and functionality from the software, customers also enjoy free quality support
through consultations and trainings that help get their businesses up and running.

Jira
Jira is an agile project management software used by development teams to
plan, track, and release software. It is a popular tool designed specifically and used
by agile teams. Aside from creating stories, planning sprints, tracking issues, and
shipping up-to-date software, users also generate reports that help improve teams,
and create their own workflows. As part of Atlassian, it integrates with many tools
that enable teams to manage their projects and products from end to end. Jira
Software is built for every member of your software team to plan,track, and release
great software. Every team has a unique process for shipping software. Use an out-
of-the-box workflow, or create one to match the way your team works.

52
ASSESSMENT SCHEDULE

Tentative schedule for the Assessment During 2022-


2023 odd semester

Name of the
S.NO Start Date End Date Portion
Assessment

1 UNIT TEST 1 UNIT 1

2 IAT 1 UNIT 1 & 2

3 UNIT TEST 2 UNIT 3

4 IAT 2 UNIT 3 & 4

5 REVISION 1 UNIT 5 , 1 & 2

6 REVISION 2 UNIT 3 & 4

7 MODEL ALL 5 UNITS

53
PRESCRIBED TEXT BOOKS AND REFERENCE BOOKS

REFERENCES:
Jennifer Davis and Ryn Daniels, Effective DevOps: Building a Culture
of Collaboration, Affinity, and Tooling at Scale, First Edition, O'Reilly
Publications.
Gene Kim, Patrick Debois et al., The DevOPS Handbook: How to
Create World-Class Agility, Reliability, and Security in Technology
Organizations, IT Revolution Press; Illustrated edition, 2016.

54
MINI PROJECT SUGGESTIONS

Exercise 1:
Install Groovy
Create a Pipelines in Jenkins which will perform following steps
Configure Java/Maven/Private Repo
Git Clone of the above said project
Maven Build
Maven Test
Sonar Scanner (if quality if OK then proceed, else exit with error message)
Repo Setup and Install Libraries in the Repo
Docker Clean Containers
Docker Clean Images
Docker Build
Docker Run Container

Points to be observed: -
Build Stability
Finger Prints
Test Case Results
Workspace
Application Logs
Jenkins Pre / Post Actions
Email Notifications
Sonar Qube Report Analysis
Time Taken for each Steps
Process Refinement

55
Thank you

Disclaimer:

This document is confidential and intended solely for the educational purpose of
RMK Group of Educational Institutions. If you have received this document through
email in error, please notify the system manager. This document contains proprietary
information and is intended only to the respective group / learning community as
intended. If you are not the addressee you should not disseminate, distribute or
copy through e-mail. Please notify the sender immediately by e-mail if you have
received this document by mistake and delete this document from your system. If
you are not the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this information is
strictly prohibited.

56

You might also like