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.
To see all the source code click!
I have used apache netbeans and i have got my src and pom.xml with all the plugins for this maven web application
you can also configure it using CMD to see click
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
after then login to your account
give the suitable tittle to it and select pipeline project and click ok
give project description
and start writing your script to get script click
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!)
it will record all your logs and when your pipeline will be build successfully it will show
open startup.bat of your tomcat and you will see that it will show deployment of a web application is finished!
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
Pipeline View
open your tomcat url along with the context path provided