Streamlining Web Application Deployment: A Comprehensive Guide to Jenkins, Maven, Tomcat, and Docker CI/CD with Complete Project

Anandshetty
20 min readMar 23, 2024

--

Introduction:

In today’s fast-paced software development landscape, the ability to deliver high-quality web applications efficiently is paramount. DevOps practices, including Continuous Integration and Continuous Deployment (CI/CD), have become essential for modern development teams. In this blog post, we’ll explore how to streamline web application deployment using Jenkins, Maven, and Tomcat, Docker.

Project Architecture

Understanding the Components:

  1. Terraform:
  • Provisioned three EC2 instances using Terraform for our deployment environment.
  • Developed scripts to automate the installation of essential tools required for our CI/CD pipeline on these instances.
  • By employing infrastructure as code principles, we ensure consistent and scalable deployment setups, while reducing manual intervention and enhancing deployment efficiency.

2. Jenkins:

  • Introduce Jenkins as a continuous integration and continuous delivery tool.
  • Describe its features for automating the build, test, and deployment pipeline.

3 . Maven:

  • Explain Maven as a build automation tool primarily used for Java projects.
  • Discuss how Maven helps manage project dependencies and build lifecycle.

4. Tomcat:

  • Introduce Apache Tomcat as a servlet container used for deploying Java web applications.
  • Explain its role in hosting and running your applications.

5. Docker:

  • Integrated Docker seamlessly into the CI/CD pipeline for automated deployment and containerization of applications.
  • Leveraged Docker’s containerization technology to ensure portability and scalability, simplifying deployment across various environments with consistent performance.

Steps to follow:

  1. IAM :

Generate Access Keys: Generate access keys (an access key ID and a secret access key) for the IAM user. These access keys serve as the credentials used by Terraform to authenticate with AWS and perform provisioning tasks.

  • select (CLI)
  • create access key
Generate Access key and SecretAccess key

Once you’ve set up your IAM user and generated access keys, the next step is to begin provisioning infrastructure with Terraform. Here’s a brief overview of what to do next:

2. Streamlining Terraform Configuration with Visual Studio Code: A Guide

1. Install Terraform:

Ensure that Terraform is installed on your local machine or the environment where you plan to run Terraform commands. You can download Terraform from the official website and follow the installation instructions for your operating system.

2. Write Terraform Configuration:

Write Terraform configuration files (typically with a .tf extension) to define your infrastructure resources. Define the desired state of your AWS resources using Terraforms declarative language.

  • Terraform Source Code
resource "aws_instance" "web1" {
ami = "ami-031134f7a79b6e424"
instance_type = "t2.micro"
key_name = "Jenkins"
vpc_security_group_ids = [aws_security_group.jenkins_sg.id]
user_data = templatefile("./Jenkins.sh", {})

tags = {
Name = "jenkins"
}

root_block_device {
volume_size = 30
}
}

resource "aws_security_group" "jenkins_sg" {
name = "jenkins_sg_unique" # Change the name to make it unique
description = "Allow TLS inbound traffic"

ingress = [
for port in [22,8080] : {
description = "inbound rules"
from_port = port
to_port = port
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
ipv6_cidr_blocks = []
prefix_list_ids = []
security_groups = []
self = false
}
]

egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}

tags = {
Name = "masterjenkins_sg"
}
}
#!/bin/bash
# Ensure that your software packages are up to date on your instance by using the following command
sudo yum update –y

# Add the Jenkins repo using the following command:
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo

# Import a key file from Jenkins-CI to enable installation from the package:
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key

# Step 3: upgrade
sudo yum upgrade

# Install Java (Amazon Linux 2023):
sudo dnf install java-17-amazon-corretto -y

#Install Jenkins:
sudo yum install jenkins -y

# Enable the Jenkins service to start at boot:
sudo systemctl enable jenkins

# Start Jenkins as a service:
sudo systemctl start jenkins

# You can check the status of the Jenkins service using the command:
sudo systemctl status jenkins
resource "aws_instance" "web2" {
ami = "ami-0eba6c58b7918d3a1"
instance_type = "t2.micro"
key_name = "Jenkins"
vpc_security_group_ids = [aws_security_group.tomcat_sg.id]
user_data = templatefile("./Tomcat.sh", {})


tags = {
Name = "Tomcat"
}





root_block_device {
volume_size = 30
}
}

resource "aws_security_group" "tomcat_sg" {
name = "tomcat_sg"
description = "Allow TLS inbound traffic"

ingress = [
for port in [22,8080] : {
description = "inbound rules"
from_port = port
to_port = port
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
ipv6_cidr_blocks = []
prefix_list_ids = []
security_groups = []
self = false
}
]

egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}

tags = {
Name = "tomcat_sg"
}



}
#!/bin/bash

# Set hostname
hostname tomcat-server

# Install Java OpenJDK 11
sudo apt update
sudo apt install openjdk-11-jdk -y

# Install necessary tools
sudo apt install git wget -y

# Create directory for Tomcat installation
sudo mkdir /tomcat
cd /tomcat

# Download and extract Apache Tomcat
sudo wget https://dlcdn.apache.org/tomcat/tomcat-10/v10.1.19/bin/apache-tomcat-10.1.19.tar.gz
sudo tar -xvzf apache-tomcat-10.1.19.tar.gz
sudo mv apache-tomcat-10.1.19 tomcat

# Make startup and shutdown scripts executable
sudo chmod +x /tomcat/tomcat/bin/startup.sh
sudo chmod +x /tomcat/apache-tomcat-9/bin/shutdown.sh

# Create symbolic links for convenience
sudo ln -s /tomcat/tomcat/bin/startup.sh /usr/local/bin/tomcatup
sudo ln -s /tomcat/tomcat/bin/shutdown.sh /usr/local/bin/tomcatdown

# Start Tomcat
sudo tomcatup

# Update the system
sudo apt upgrade -y
resource "aws_instance" "web2" {
ami = "ami-07c589821f2b353aa"
instance_type = "t2.micro"
key_name = "Jenkins"
vpc_security_group_ids = [aws_security_group.jenkins_sg.id]
user_data = templatefile("./docker.sh", {})


tags = {
Name = "docker"
}





root_block_device {
volume_size = 30
}
}

resource "aws_security_group" "docker_sg" {
name = "docker_sg"
description = "Allow TLS inbound traffic"

ingress = [
for port in [22, 443, 80, 8080] : {
description = "inbound rules"
from_port = port
to_port = port
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
ipv6_cidr_blocks = []
prefix_list_ids = []
security_groups = []
self = false
}
]

egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}

tags = {
Name = "docker_sg"
}



}
#!/bin/bash

# Add Jenkins repository key
sudo apt-get update && sudo apt-get install -y gnupg2 curl software-properties-common
sudo curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -

# Add Jenkins repository
sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'

# Update package lists
sudo apt-get update

# Install Jenkins and Docker
sudo apt-get install -y jenkins docker.io

# Start Docker service
sudo systemctl start docker

# Enable Docker service to start on boot
sudo systemctl enable docker

# Start Jenkins service
sudo systemctl start jenkins

# Enable Jenkins service to start on boot
sudo systemctl enable jenkins

# Install Git
sudo apt-get install -y git

# Set hostname
sudo hostnamectl set-hostname Master-server

# Install Java (OpenJDK 11)
sudo apt-get install -y openjdk-11-jdk

# Display Jenkins initial admin password
echo "Jenkins initial admin password:"
sudo cat /var/lib/jenkins/secrets/initialAdminPassword

A Guide to Initialization and Application:

Main commands:
init Prepare your working directory for other commands
validate Check whether the configuration is valid
plan Show changes required by the current configuration
apply Create or update infrastructure
destroy Destroy previously-created infrastructure

Call to Action: Explore My GitHub Repository

check configuration is valid or not by terraform validate and terraform apply
  • To unlock Jenkins, copy the specified variable path and retrieve the password required for unlocking
cat /var/lib/jenkins/secrets/initialAdminPassword

Streamlining CI/CD: Automating GitHub Integration with Jenkins for Efficient Pipeline Execution

  • I integrated GitHub with Jenkins to automate my CI/CD pipelines. Using a simple pipeline script, I fetched code from my GitHub repository, executed sample code, and displayed the workspace path. This streamlined my development workflow and enhanced code deployment efficiency.
  • Installing GitHub Plugins in Jenkins :
  • Jenkins Configuration for source code Management : Setting Repository URL and Branch :
  • You can utilize the source code from my GitHub Project
  • Build one small job
Run Sample code
Building Workspace
  • After Git integration is completed in Jenkins, the subsequent step is to trigger the maven build process to compile , test , and package the project

“ To learn more about Maven, click on the provided link for detailed information and insights “

  • To download maven visit the official Apache Maven website and follow the instructions for downloading and installing the latest version
  • Copy the Apache Maven .tar file link address to initiate the download processes.
copy .tar file
  • Become root user
sudo su -
  • Navigate to your Server and change directory to /opt. then, paste the link to the Apache file and download it using below commands
cd /opt/
wget https://dlcdn.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz
apache downloaded
  • After Downloading , unzip the Apache file using below command
tar -xvzf apache-file
unzip apache file
  • Rename the Apache file to “Maven” using the ‘mv’ command.
mv apache-maven-3.8.6 maven
  • Navigate to the Apache (Maven) folder, list its contents using the ls command, move to the bin folder, and execute the command ./mvn -v to check the Maven version.
cd /opt/maven
ls
cd bin/
ls
./mvn -v
  • Update your environment variables in the bash profile to include the path to the Maven bin directory for easy access.
cd 
ll -a
vim .bash_profile
  • Update your bash profile by setting the installation directory of Maven using the M2_HOME variable and specifying the directory where Java is installed with JAVA_HOME. Additionally, export the path to the Maven bin directory by appending it to the PATH variable. This ensures easy access to Maven and Java commands from anywhere in your terminal.

M2=/opt/maven/bin
# set maven home
M2_HOME=/opt/maven
# set Java Home
# If you're unsure about the Java installation path, you can find it by running the command:
find / -name java
# copy java path
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.16.0.8-1.amzn2.0.1.x06_64/
# Add bin directory to PATH
# Export Path
PATH=$PATH:$HOME/bin:$M2:$M2_HOME:$JAVA_HOME
  • To check if the path is linked to the global variable, you can run source .bash_profile followed by echo $PATH to verify the path inclusion in the global variable.
source .bash_profile
echo $PATH
  • Now, you can verify that Maven is accessible from anywhere by typing mvn -v in your terminal, which should display the Maven version information.
mvn -v
  • After completing the setup, the next step is to integrate Maven into Jenkins for seamless build and deployment processes
  • Next, install the Maven plugin in Jenkins to enable Maven build capabilities and streamline project management tasks.
Install Maven Plugin
  • Then, navigate to “Manage Jenkins” > “Global Tool Configuration” to specify the paths for your JDK and Maven installations.
JDK Installation

Note : you can verify the JAVA_HOME by executing the command ‘echo $PATH’ and Copy the JAVA_HOME Path

JAVA_PATH
Maven Installation
  • Now, let’s create a Maven project job in Jenkins that integrates GitHub, Maven, and Jenkins for streamlined project management and automation.
creating Job Maven Project
  • Now, let’s proceed with the configuration of the Maven project job in Jenkins.
  • Add the Repository URL for source code management in the Jenkins job configuration.
ADD Git configuration
  • In the pre-build steps, specify the build goals as “clean install” to ensure a clean build and installation process in the Maven project.
Build
  • Now, proceed to build the job to initiate the Maven build process and execute the configured steps.
Job build success
  • In the workspace, you will find the “WebApp” directory. Inside the “WebApp” directory, a “target” folder is generated. Within the “target” folder, you will discover a WAR (Web Application Archive) file containing the compiled artifacts.
webapp .war file
  • Lets Proceed with installing Tomcat to setup another instance
  • Launch your instance, connect to it, and switch to the root user for administrative tasks.
  • Proceeding with manual installation now, although a script is available as an alternative
#!/bin/bash
hostname tomcat-server
sudo amazon-linux-extras install java-openjdk11 -y
sudo yum install git wget -y
sudo mkdir /tomcat
cd tomcat
sudo wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.70/bin/apache-tomcat-9.0.70.tar.gz
sudo tar -xvzf /tomcat/apache-tomcat-9.0.70.tar.gz
sudo mv /tomcat/apache-tomcat-9.0.70 /tomcat/apache-tomcat-9

sudo chmod +x /tomcat/apache-tomcat-9/bin/startup.sh
sudo chmod +x /tomcat/apache-tomcat-9/bin/shutdown.sh

sudo ln -s /tomcat/apache-tomcat-9/bin/startup.sh /usr/local/bin/tomcatup
sudo ln -s /tomcat/apache-tomcat-9/bin/shutdown.sh /usr/local/bin/tomcatdown
tomcatup

sudo yum update -y
  • Proceeding with manual installation now

→ Head over to the provided link to download Apache Tomcat, and then proceed to copy the downloaded tar file into the appropriate directory as per the Apache official documentation

Copy the link address of the tar file
  • Create a directory named “/opt” and use the ‘wget’ command to download the tar file into this directory.
cd /opt/
wget https://dlcdn.apache.org/tomcat/tomcat-10/v10.1.19/bin/apache-tomcat-10.1.19.tar.gz
Apache Downloaded
  • After Downloading , unzip the Apache file using below command
tar -xvzf tomcat-file
unzip tomcat file
  • Additionally, Install Java According to your Operating System's Requirements
sudo amazon-linux-extras install java-openjdk11 -y
  • After installing Apache Tomcat, navigate to the bin folder and list its contents. You will find the start.sh script, which you can use to start your Tomcat server.
./startup.sh
Tomcat Started
Tomcat Home page
  • When attempting to access the manager app, if you encounter access issues, you may receive a message indicating that you need to edit the manager’s context.xml file.
  • Now we should open and edit context.xml
  • Now that both Jenkins and Tomcat are using port number 8080, integrating them may result in conflicts. To avoid this, consider changing the port number of Tomcat.
  • Navigate to the Apache Tomcat directory, then go to the “conf” folder. You’ll find the “context.xml” file there. Edit this file to change the port number.
edit port no 8080 to 8082 and save
  • Now, restart Tomcat to apply the changes made to the port number, then attempt to access it again.
  • Now we should open and edit context.xml
  • You can locate the “context.xml” file by using the command: find / -name context.xml.
  • In the context.xml file, if you encounter a valve configuration like <Valve className=”…”/>, you may need to temporarily comment it out by adding <! — before the valve and → after it.
comment out the <valve>
  • Now, let’s proceed to configure the manager app as well.
comment out manager app
  • After making the necessary changes, remember to stop Tomcat, restart it, and then attempt to access it
  • Now, you should be able to access the manager app. When prompted, enter your username and password.
Give username and password
  • The manager app prompts you to add the “manager.gui” role to a user named “tomcat” with the password “s3cret”. You need to add the following configuration to the specified config file.
  • Edit the tomcat-users.xml file and add the necessary configuration.
edit the tomcat-users.xml file

Note : After making the necessary changes, remember to stop Tomcat, restart it, and then attempt to access it

  • Now you get to access
  • Now, the Tomcat application is up and running with full accessibility. Proceed to deploy the application.

→ Integrate Jenkins with Tomcat for seamless deployment and management of applications.

  • Now, install a plugin called “Deploy to Container” for streamlined deployment management in Jenkins.
  • Now Create a new job in Jenkins
  • Create a new job, and if you prefer to create it from an existing item, you can utilize this option.
create a job
create item from existing
  • In the job configuration, go to the post-build actions section.
  • Select “Deploy war/ear to container.”
  • Find the WAR/EAR files listed and copy ‘*/.war’.
  • Choose the container; for now, let’s select Tomcat 8 or 9.
Add
Give Credentials
  • Add Tomcat URL
Add tomcat URL
  • Apply the changes, save the configuration, review all settings once again, and proceed to build the job.
Build Success
  • Now, navigate to the manager app, where you will find the deployed web application. Click on it to confirm that the deployment was successful.
You get web app
  • The application has been deployed successfully in Tomcat, demonstrating the seamless integration between Jenkins and Tomcat for automated deployment processes.

Now, let’s proceed with deploying the application in Docker.

  • Create a Docker server as well to facilitate the deployment process.
  • Follow the provided script to complete the installation and configuration process.
#!/bin/bash

# Add Jenkins repository key
sudo apt-get update && sudo apt-get install -y gnupg2 curl software-properties-common
sudo curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -

# Add Jenkins repository
sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'

# Update package lists
sudo apt-get update

# Install Jenkins and Docker
sudo apt-get install -y jenkins docker.io

# Start Docker service
sudo systemctl start docker

# Enable Docker service to start on boot
sudo systemctl enable docker

# Start Jenkins service
sudo systemctl start jenkins

# Enable Jenkins service to start on boot
sudo systemctl enable jenkins

# Install Git
sudo apt-get install -y git

# Set hostname
sudo hostnamectl set-hostname Master-server

# Install Java (OpenJDK 11)
sudo apt-get install -y openjdk-11-jdk

# Display Jenkins initial admin password
echo "Jenkins initial admin password:"
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
  • Also perform the installation manually by following the outlined steps.
  • Now, set the hostname or change it to “Docker-Server” for the Docker server.
Change Hostname
  • Now, if we want to create Docker images, we can always use Docker Hub
  • Before Install Docker
yum install docker -y
  • After Install
# Enable docker 
systemctl enable docker
# Start docker
systemctl start docker
# daemon reload
systemctl daemon-reload
  • Check Docker Is Active and Running
systemctl status docker
Docker is Active and Running
  • Now, let’s pull the official Docker Tomcat image. Copy the pull command from the Docker documentation.
  • You can obtain the pull command from the provided link below.
copy the docker pull tomcat
Tomcat pull successfully
  • After pulling the Tomcat image, verify the images to ensure the download was successful
Docker Images
  • Now, let’s create a container using the pulled Tomcat image
  • Copy the image ID and use the following command to run the container: docker run -d — name c1 -p 8080:80 imageid
docker run -d - name c1 -p 8080:80 imageid
  • After running the container, copy the public IP address along with the port number and access the Tomcat application.
  • If we are unable to access or we get like this
  • If you are unable to access the page or encounter a 404 “Not Found” error, double-check the configuration and ensure that the container is running properly.
  • To enter the container, use the command docker exec -it container_id /bin/bash.
docker exec -it container_id /bin/bash
  • After setting the CATALINA_HOME environment variable, continue troubleshooting the issue.
  • After that, execute the ls command to list the contents, and you will find the webapps.dist directory. Navigate inside the webapps.dist directory and execute the ls command again.
  • If you navigate to the webapps directory and find it empty, that’s likely the reason why you are unable to access the page.
  • Now, navigate inside the webapp.dist directory and copy all the contents from webapp.dist to the webapp directory.by using command cp -R * ../webapp/
cp -R * ../webapp/
Copy the all files from webapps.dist to the webapp
  • After completing the copying process, you should be able to access the page successfully.

Now that we’ve completed the manual process, let’s proceed to configure the Docker file.

  • Now, let’s remove all images and containers to clean up the environment.
docker images
docker ps -a
docker stop c1
ls
docker ps
  • If we want to delete unused resources, including containers, networks, and images, we can use the command docker system prune -a.
docker system prune -a
Image Deleted
  • Now, let’s add the Docker group by viewing the contents of the “/etc/group” file and then proceed to add it.
  • Before adding the user “dockeradmin,” let’s ensure we have the password for it. Check the password for “dockeradmin” by running the command passwd dockeradmin and provide a new password when prompted.
passwd dockeradmin
Set new password
  • Grant Specific privileges to the “dockeradmin” user.
  • we need to enable ssh password authentication
  • Navigate to the sshd_config file: vim /etc/ssh/sshd_config.
  • Uncomment the line “PasswordAuthentication yes”.
  • Comment out the line “PasswordAuthentication no”.
  • Save the changes and exit the editor.
  • Reload the SSH service: service sshd reload.
  • After that, we need to grant some root privileges using the visudo command.
  • or the “dockeradmin” user, grant permissions to execute all Docker commands by adding the following line to the sudoers file using the visudo command
dockeradmin ALL=(ALL) NOPASSWD: ALL
  • After granting permissions to the “dockeradmin” user, add the user to the Docker group using the following command:
sudo usermod -aG docker dockeradmin
  • After executing the command to add the user “dockeradmin” to the Docker group, you can verify if the group was created by running the command:
cat /etc/group
  • Similarly, to check if the user “dockeradmin” has been granted all types of access, you can inspect the “/etc/passwd” file by running:
cat /etc/passwd
  • Create a Docker directory.
  • Create a Dockerfile within the “docker” directory by running vim Dockerfile.
create docker file
FROM tomcat:latest
RUN cp -R /usr/local/tomcat/webapps.dist/* /usr/local/tomcat/webapps
COPY ./*.war /usr/local/tomcat/webapps
  • FROM tomcat:latest: Specifies the base image as the latest version of Tomcat.
  • RUN cp -R /usr/local/tomcat/webapps.dist/* /usr/local/tomcat/webapps: Copies all contents from webapps.dist to webapps directory in the Tomcat container.
  • COPY ./*.war /usr/local/tomcat/webapps: Copies all WAR files from the current directory to the webapps directory in the Tomcat container.
  • After configuring the Dockerfile, proceed to build the Docker image using the Docker build command.
docker build -t tomacat:v1 .
  • Now, create a container from the built Docker image.
V1 is created
  • First, verify that the Docker image is successfully created. Then, create a container using the command docker run -d — name c1 -p 8081:80 ImageId.
docker run -d - name c1 -p 8081:80 ImageId
Container is created
  • If you encounter access issues similar to those in Tomcat, navigate to the context.xml file and comment out the Valve classname as previously done.
comment out the valve

After resolving any access issues and ensuring the container is running smoothly, proceed to integrate it with Jenkins for automated deployment and management

  • Go to the Jenkins dashboard.
  • Navigate to “Manage Jenkins” > “Manage Plugins”.
  • In the “Available” tab, search for “Publish over SSH”.
  • Install the “Publish over SSH” plugin.
Install “Publish Over SSH” Plugin
  • Go to the Jenkins dashboard.
  • Click on “New Item” to create a new item.
  • Name the item as ‘integrating-github-maven-jenkins-docker’.
  • Select the option to copy from the previous Tomcat configuration.
create job
  • Go to “Manage Jenkins” > “Configure System”.
  • Add a new SSH server named “Docker-Server”.
  • Use the private IP address for the hostname.
  • et the username as “dockeradmin”.
  • ave and apply the changes.
Configure the ssh server

Note : Before proceeding, change the ownership of the Docker directory to “dockeradmin” by running the command chown dockeradmin:dockeradmin dockeradd

chown dockeradmin:dockeradmin dockeradd
change ownership
Give password and test Configuration and save it
  • Go to “Post-build Actions” in the Jenkins job configuration.
  • Select “Send build artifacts over SSH”.
  • Specify the path to the WAR file in the “Source files” field.
  • Use “/*.war” to include any WAR file generated.
  • Set “Remove prefix” to “/webapp/target/”.
  • Specify the “Remote directory” as “/opt/docker”.
  • In the “Execute command” field, use docker build -t sl .; docker run -d — name c1 -p 8086:8080 sl.
  • Save and apply the changes.
  • Trigger the build to deploy the WAR file to Docker.
Configure the post-build-actions
  • The build has been completed successfully, and below, you can see that the Docker image and container have been created successfully.
Build Success
Successfully images and containers are created
  • Additionally, our application has been successfully published through Docker.
application deployed successfully

NOTE : The previous code has been modified, and changes have been made in the GitHub repository. As a result, we now have different applications deployed.

NOTE : Alternatively, you can configure Jenkins to poll the source code repository (poll SCM) periodically. This way, Jenkins will automatically detect changes in the codebase, trigger a build, and deploy the updated application. This enhances automation and ensures that the application is always up-to-date with the latest changes.

In conclusion, streamlining the web application deployment process through Jenkins, Maven, Tomcat, and Docker CI/CD has proven to be a transformative journey. By leveraging automation and best practices across these technologies, organizations can achieve greater efficiency, reliability, and speed in delivering high-quality software to their users. Embracing these technologies fosters a culture of collaboration and innovation, driving continuous improvement and success in today’s dynamic digital landscape. Thank you for joining me on this enlightening exploration.

--

--

Anandshetty

Experienced in AWS CI/CD and DevOps, I optimize software delivery and contribute to transformative projects with dedication and innovation.