Skip to content

Sumyak-Jain/CI-CD-Pipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What we will do?

We will develop and deploy a basic maven web application in Java using DevOps tools like Apache Maven as a build tool, GitHub for source code management, Selenium for testing, Jenkins for Continuous integration and Apache Tomcat for deployement and use jenkins plugin to monitor our pipeline.

All things will be done under one Jenkins Pipeline!

alt txt

For example we will develop a basic four function Calculator!

STEP-1 : Write the sourcecode for a basic four function Calculator

To see all the source code click!

STEP-2 : Configure it using any maven present IDE

I have used apache netbeans and i have got my src and pom.xml with all the plugins for this maven web application

alt txt alt txt

you can also configure it using CMD to see click

STEP-3 : Make a repo on github and push it using git

alt txt alt txt

STEP-4 : Open Jenkins.war and login to your account

Write the following command on CMD to open jenkins.war file

// Normal command
java -jar jenkins.war

// To change port no.
java -jar jenkins.war --httpPort=8383

alt txt

after then login to your account

alt txt alt txt

STEP-5 : Make a new jenkins pipeline

give the suitable tittle to it and select pipeline project and click ok

alt txt

STEP-6 : Give project url and write its script

give project description

alt txt

and start writing your script to get script click

alt txt

STEP-6 : Click on Build now and start building your project

what it will do?

  • Fetch your sourcecode from github
  • Compile it
  • Make its build ( a .war file)
  • Test it using selenium (basic)
  • and then deploy it to a tomcat server

pipeline will do all its job stage by stage and you will get outputs like (for every successfull job!)

alt txt

alt txt

alt txt

alt txt

STEP-7 : Check your jenkins.war

it will record all your logs and when your pipeline will be build successfully it will show

alt txt

STEP-8 : Check your tomcat server

open startup.bat of your tomcat and you will see that it will show deployment of a web application is finished!

alt txt

STEP-9 : Start monitoring!

first install a delivery pipeline view plugin in your jenkins it will be showing two views

  • one for a dashboard
  • other a pipeline view

you can monitor all it changes, time, start time, end time ,logs etc

Dashboard Stage View

alt txt

Pipeline View

alt txt

STEP-10 : Check your Web Application

open your tomcat url along with the context path provided

alt txt

alt txt

THANK YOU 😊