CI-CD Petclinic
Petclinic static web application Deployment with help of Jenkins & Tomcat Server
Required Tools
Git-Hub
Git Hub is a Version Control System developer who commits their code changes to a version control system like Git.
Jenkins
Jenkins is a Continuous Integration Server, Jenkins is set up to monitor the version control system for changes. Whenever a new commit is made, Jenkins automatically triggers a build process
Jenkins checks out the latest code from the repository and performs a build process. This typically involves tasks such as compiling the code, running unit tests, and generating build artifacts.
Build tool, Maven
Maven is a powerful build automation and dependency management tool used primarily for Java projects.
Tomcat
Apache Tomcat is an open-source web server and servlet container developed by the Apache Software Foundation. It is one of the most popular Java-based web application servers used for deploying and running Java servlets and JavaServer Pages (JSP).
Tomcat is designed to be lightweight and easy to use, making it a popular choice for developers and organizations looking to deploy Java web applications. Tomcat is widely used in both development and production environments and is compatible with various operating systems, including Windows, Linux, and macOS.
tomcat installation commands for Ubuntu check out the below GitHub URL
https://github.com/Raghava0684/petclinic-jenkinsfile/blob/main/tomcat%20installation%20commands
to install Jenkins Server on Ubuntu check out the below GitHub URL
https://github.com/Raghava0684/petclinic-jenkinsfile/blob/main/jenkins%20installation%20commands
Required Plugins for Jenkins
in this task im using both java11 and the Maven plugin for building the code
under settings Manage Jenkins >> Manage Plugins >> Available Plugins
1. Eclipse Temurin installerVersion openJDK-native-plugin
From the home page, click on the link Manage Jenkins and click on Configure System as shown below
select a new item and give a proper name for the project and choose the pipeline project and click on OK
Sample Jenkinsfile (Declarative Pipeline)
for the Jenkins Declarative pipeline file check out the below GitHub URL.
https://github.com/Raghava0684/petclinic-jenkinsfile/blob/main/Jenkinsfile
for the source code check out the below GitHub URL
https://github.com/Raghava0684/Petclinic-project
once the build is successful Jenkins pipelines look like this
once the build is successful browse the instance public with port 8080 for the Tomcat server
Thank you so much for reading my blog...!!!