Skip to content

nasiroddin-qatib/maven-springboot-employee-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Jenkins CI Pipeline with Maven and Spring Boot

πŸ“Œ Project Overview

This project demonstrates a Continuous Integration (CI) pipeline using Jenkins integrated with GitHub.

The application is a simple Spring Boot Employee API built using Maven, and Jenkins automatically builds the project by reading the Jenkinsfile from the GitHub repository.

The pipeline runs multiple stages to build, test, and package the application, producing a JAR artifact.

This project demonstrates how modern DevOps workflows automate:

Pulling source code from GitHub

Building the application using Maven

Running automated tests

Packaging the application as an executable JAR

Generating build artifacts using Jenkins CI

βš™οΈ Tech Stack

Java 17

Spring Boot

Maven

Jenkins

Git

GitHub

πŸ“‚ Project Structure jenkins-ci β”‚ β”œβ”€β”€ Jenkinsfile β”œβ”€β”€ pom.xml β”œβ”€β”€ README.md └── src └── main β”œβ”€β”€ java/com/example/employee β”‚ β”œβ”€β”€ EmployeeApiApplication.java β”‚ └── HelloController.java β”‚ └── resources └── application.properties βš™οΈ Jenkins Pipeline Stages

The pipeline defined in the Jenkinsfile contains the following stages:

1️⃣ Checkout

Pulls the source code from the GitHub repository.

2️⃣ Build mvn compile

Compiles the application source code.

3️⃣ Test mvn test

Runs the automated tests.

4️⃣ Package mvn package

Packages the application and generates the final JAR artifact.

πŸ“¦ Generated Artifact

After the pipeline execution, Maven generates the application artifact:

target/employee-api-1.0.jar

This artifact can later be used for deployment in servers, containers, or cloud environments.

πŸ”„ CI Pipeline Workflow Developer Push Code β†’ GitHub ↓ Jenkins ↓ Checkout ↓ Build ↓ Test ↓ Package ↓ Artifact (.jar) ▢️ Run Application Manually (Optional)

The generated artifact can be executed manually:

java -jar target/employee-api-1.0.jar

Then access in browser:

http://localhost:8080/

Example response:

Welcome to Employee API - Jenkins CI Pipeline Working! 🎯 What This Project Demonstrates

This project proves understanding of:

Jenkins CI pipeline creation

GitHub integration with Jenkins

Pipeline as Code using Jenkinsfile

Maven build lifecycle

Automated build, test, and packaging

Artifact generation in CI pipelines

πŸ’Ό Why This Project Matters

This repository demonstrates how DevOps engineers automate application builds using Continuous Integration pipelines.

It reflects real-world practices such as:

Build automation

CI pipeline orchestration

Source control integration

Artifact generation for deployment pipelines

πŸ‘¨β€πŸ’» Author

Developed as part of hands-on practice to strengthen AWS, DevOps, and CI/CD pipeline skills.

About

Spring Boot web application built with Maven that runs as a jar and serves HTTP requests.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages