CI-CD  Petclinic

CI-CD Petclinic

Petclinic static web application Deployment with help of Jenkins & Tomcat Server

Required Tools

  1. Git-Hub

    Git Hub is a Version Control System developer who commits their code changes to a version control system like Git.

  2. 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.

  3. Build tool, Maven

    Maven is a powerful build automation and dependency management tool used primarily for Java projects.

  4. 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.

  5. tomcat installation commands for Ubuntu check out the below GitHub URL

    https://github.com/Raghava0684/petclinic-jenkinsfile/blob/main/tomcat%20installation%20commands

  6. 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

  7. under settings Manage Jenkins >> Manage Plugins >> Available Plugins

    1. Eclipse Temurin installerVersion openJDK-native-plugin

  8. 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

Classic UI left column

Enter a name, click <strong>Pipeline</strong> and then click <strong>OK</strong>

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

alt text

Thank you so much for reading my blog...!!!