CI/CD Pipeline using Git, Jenkins, Maven, and Tomcat

CI/CD Pipeline using Git, Jenkins, Maven, and Tomcat

Step 1:-

•Setup a Linux EC2 Instance •Install Java •Install Jenkins •Start Jenkins •Access Web UI on port 8080

Images:

01. Setup a Linux EC2 Instance

Screenshot 2023-03-12 202227

Screenshot 2023-03-12 202250

Screenshot 2023-03-12 202354

02. Install JAVA , Jenkins and then start Jenkins

1

Screenshot 2023-03-12 200139

Screenshot 2023-03-12 200233

Screenshot 2023-03-12 200525

Screenshot 2023-03-12 200612

Screenshot 2023-03-12 200647

2

Screenshot 2023-03-12 200729

Screenshot 2023-03-12 201055

Screenshot 2023-03-12 201126

Screenshot 2023-03-12 201143

Screenshot 2023-03-12 201335

Screenshot 2023-03-12 201353

Screenshot 2023-03-12 201445

3

Screenshot 2023-03-12 201445

Screenshot 2023-03-12 201612

Screenshot 2023-03-12 202437

Screenshot 2023-03-12 202754

03. Start Jenkins And Access Web UI on port 8080

Screenshot 2023-03-12 202816

Screenshot 2023-03-12 202915

Screenshot 2023-03-12 203022

Screenshot 2023-03-12 203331

Step 2: Build Code

•Setup Maven on Jenkins Server •Setup Environment Variables •JAVA_HOME, M2, M2_HOME •Install Maven Plugin •Configure Maven and Java

Images

01. Setup Maven on Jenkins Server

Screenshot 2023-03-12 212344

Screenshot 2023-03-12 212452

Screenshot 2023-03-12 212511

Screenshot 2023-03-12 212601

Screenshot 2023-03-12 212623

Screenshot 2023-03-12 214923

Screenshot 2023-03-12 215102

Screenshot 2023-03-12 215156

Screenshot 2023-03-12 215401

02. Setup Environment Variables

Screenshot 2023-03-12 215451

Screenshot 2023-03-12 215918

03. JAVA_HOME, M2, M2_HOME

Screenshot 2023-03-12 220947

Screenshot 2023-03-12 221224

04.Install Maven Plugin

Screenshot 2023-03-12 221415

Screenshot 2023-03-12 221439

Screenshot 2023-03-12 221517

Screenshot 2023-03-12 221638

Screenshot 2023-03-12 221813

05. Configure Maven and Java

Screenshot 2023-03-12 222603

Screenshot 2023-03-12 222617

Screenshot 2023-03-12 222813

Screenshot 2023-03-12 223136

Screenshot 2023-03-12 223159

06. Build

Screenshot 2023-03-12 223251

Screenshot 2023-03-12 223409

Screenshot 2023-03-12 223423

07. Images

Screenshot 2023-03-12 223548

Screenshot 2023-03-12 223625

Screenshot 2023-03-12 223727

Screenshot 2023-03-12 223808

Screenshot 2023-03-12 223843

Screenshot 2023-03-12 223855

step 3: Integrate GitHub with Jenkins

•Install Git on Jenkins Instance •Install GitHub Plugin on Jenkins GUI •Configure Git on Jenkins GUI

Images:

01. Install Git on Jenkins Instance

Screenshot 2023-03-12 205453

Screenshot 2023-03-12 205636

Screenshot 2023-03-12 205651

Screenshot 2023-03-12 205717

02. Install GitHub Plugin on Jenkins GUI

Screenshot 2023-03-12 205801

Screenshot 2023-03-12 205833

Screenshot 2023-03-12 205857

Screenshot 2023-03-12 210025

Screenshot 2023-03-12 210054

Screenshot 2023-03-12 210247

03. Configure Git on Jenkins GUI

Screenshot 2023-03-12 210321

Screenshot 2023-03-12 210526

Screenshot 2023-03-12 210657

Screenshot 2023-03-12 210831

step 4: Deploy Artifacts on a Tomcat Server

•Setup a Linux EC2 Instance •Install Java •Download and configure Tomcat •Start Tomcat Server •Access Web UI on port 8080

01. Setup a Linux EC2 Instance

Screenshot 2023-03-12 235439

Screenshot 2023-03-12 235744

02. Install Java

Screenshot 2023-03-13 000605

Screenshot 2023-03-13 001659

Screenshot 2023-03-13 001905

03. Download and configure Tomcat

Screenshot 2023-03-13 002022

Screenshot 2023-03-13 003147

Screenshot 2023-03-13 003301

Screenshot 2023-03-13 003411

Screenshot 2023-03-13 003446

Screenshot 2023-03-13 003506

04. Start Tomcat Server and Access Web UI on port 8080

Screenshot 2023-03-13 003622

Screenshot 2023-03-13 003701

Step 5: Integrate Tomcat with Jenkins

Install “Deploy to container”

Screenshot 2023-03-13 010813

Screenshot 2023-03-13 012906

Screenshot 2023-03-13 012921

Configure tomcat server with Credentials

Screenshot 2023-03-13 020549

Screenshot 2023-03-13 020636

Screenshot 2023-03-13 020851

Screenshot 2023-03-13 020913

Screenshot 2023-03-13 020927

Screenshot 2023-03-13 021020

Screenshot 2023-03-13 021326

Screenshot 2023-03-13 021344

Final

Screenshot 2023-03-13 021502

▶ GitHub Link
🔗Romeshdg/Simple-DevOps-Project (github.com)

📍 Thanks for reading, and happy learning! :) ✌

✨Let's continue to learn and grow together.

follow me on LinkedIn for more updates and insights. Also, don't forget to like, share, and comment on this post to spread the word and help others in their Learning journey.

Did you find this article valuable?

Support Romesh Dharamgudi's blog by becoming a sponsor. Any amount is appreciated!