This repository contains the source code and CI/CD pipeline for the REPtel application developed in JavaFX with MySQL. The CI/CD pipeline is implemented using Jenkins and includes stages such as Git Checkout, Compile, SonarQube Analysis, OWASP SCAN, Build Application, Build & Push Docker Image, and Trigger CD Pipeline.
src/
: Contains the source code for the REPtel application.Dockerfile
: Dockerfile for building a Docker image of the REPtel application.Jenkinsfile
: Defines the CI/CD pipeline stages for Jenkins.
Before running the CI/CD pipeline, make sure you have the following tools installed:
- Java Development Kit (JDK 17)
- Docker
- SonarQube Scanner
- Install Jenkins on your server or local machine.
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install -y jenkins
- Configure Jenkins with the necessary plugins for Git, Docker, and SonarQube.
java -jar jenkins-cli.jar -s http://localhost:8080/ install-plugin git docker sonar -restart
- Create a Jenkins pipeline job and link it to this repository.
java -jar jenkins-cli.jar -s http://localhost:8080/ build RepertoireTelephonique-CI-CD
- Git Checkout: Fetches the latest source code from the repository.
- Print Directory Contents Before Compile: Prints directory contents before the compilation stage.
- Compile: Compiles the Java source code and stores the classes in the
target
directory. - Print Directory Contents After Compile: Prints directory contents after the compilation stage.
- SonarQube Analysis: Performs static code analysis using SonarQube.
- OWASP SCAN: Conducts a security scan using OWASP Dependency-Check.
- Build Application: Creates a JAR file for the REPtel application.
- Build & Push Docker Image: Builds a Docker image and pushes it to Docker Hub.
- Trigger CD Pipeline: Triggers the downstream CD pipeline.
To run the CI/CD pipeline manually, execute the Jenkins pipeline job.
This project is licensed under the MIT License.
Feel free to contribute and open issues for any improvements or bugs.