Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
b8132b2
Add files via upload
Josral04 Mar 17, 2025
61d5fae
Fixed BDD_video.mp4
jchowjr Mar 17, 2025
3b5db20
Update Description.md
Josral04 Mar 17, 2025
a538b68
Merge pull request #1 from Josral04/feature/Josral.update
jchowjr Mar 17, 2025
9ff3422
updated the file
Mar 17, 2025
2ffbad6
Merge pull request #3 from Josral04/feature/addme
Josral04 Mar 17, 2025
ea22cd5
Updated Testing Description
jchowjr Mar 17, 2025
ff0aa49
Merge pull request #4 from Josral04/features/bug-testing
Josral04 Mar 17, 2025
25d2cfd
Rename Description.md to README(2).md
Josral04 Mar 17, 2025
d6b59cc
Raza Update README(2).md
MAunRaza Mar 17, 2025
ab819d3
Merge pull request #5 from Josral04/feature/Raza
MAunRaza Mar 17, 2025
aca984e
edited the readme file
NatnaelTekli Mar 17, 2025
d31878a
Merge pull request #6 from Josral04/feature/edit_readme
Josral04 Mar 17, 2025
54706be
Create dockerfile
NatnaelTekli Mar 17, 2025
98f3dd2
Merge pull request #7 from Josral04/feature/edit_readme
Josral04 Mar 17, 2025
bab5c70
Update build.gradle
Josral04 Mar 17, 2025
08ac2fb
edited the readme file
Mar 18, 2025
ae8ab17
Merge pull request #8 from Josral04/feature/editing_readmefile
NatnaelTekli Mar 18, 2025
73ea0d2
Update README(2).md
NatnaelTekli Mar 18, 2025
ba30de5
added the jenkins dockerfile
NatnaelTekli Apr 12, 2025
fc3a8ea
added the jenkins dockerfile
NatnaelTekli Apr 12, 2025
7876866
added the jenkins dockerfile
NatnaelTekli Apr 12, 2025
bc92c09
Merge pull request #9 from Josral04/add_dockerfile
NatnaelTekli Apr 12, 2025
19f953a
created the docker-compose file
NatnaelTekli Apr 12, 2025
91dcb01
Merge pull request #10 from Josral04/add_dockerfile
NatnaelTekli Apr 12, 2025
c8dffc3
first test
NatnaelTekli Apr 12, 2025
b5ab142
Merge pull request #11 from Josral04/first_test
NatnaelTekli Apr 12, 2025
ac8a144
second test
NatnaelTekli Apr 12, 2025
429b26d
Merge pull request #12 from Josral04/first_test
NatnaelTekli Apr 12, 2025
a907726
fixed the jenkinsfile
NatnaelTekli Apr 12, 2025
ca71fff
Merge pull request #13 from Josral04/first_test
NatnaelTekli Apr 12, 2025
dde7a03
Triggering Jenkins
jchowjr Apr 13, 2025
9c2a659
Merge pull request #14 from Josral04/jenkins-githubintegration
NatnaelTekli Apr 13, 2025
6c692df
testing the trigger part
NatnaelTekli Apr 13, 2025
71467cc
Merge pull request #15 from Josral04/testing_trigger
NatnaelTekli Apr 13, 2025
7c9969f
second try
NatnaelTekli Apr 13, 2025
93549b7
Merge pull request #16 from Josral04/testing_trigger
NatnaelTekli Apr 13, 2025
6594f15
Added a new branch to connect Jenkins
Josral04 Apr 13, 2025
9403f02
Merge pull request #17 from Josral04/new_branch
Josral04 Apr 13, 2025
57f5a6d
Removed changes
Josral04 Apr 13, 2025
97bd257
Merge pull request #18 from Josral04/new_branch
Josral04 Apr 13, 2025
ffa1e3d
Thank you
Josral04 Apr 13, 2025
dd57884
Merge pull request #19 from Josral04/new_branch
Josral04 Apr 13, 2025
8e82cc0
trigger jenkins with public port
jchowjr Apr 13, 2025
5b8dedb
Merge pull request #20 from Josral04/jenkins-githubintegration
jchowjr Apr 13, 2025
06e5b19
remove
Josral04 Apr 13, 2025
aede785
Merge pull request #21 from Josral04/new_branch
Josral04 Apr 13, 2025
2476d3b
.
Josral04 Apr 13, 2025
42000a8
Merge pull request #22 from Josral04/new_branch
Josral04 Apr 13, 2025
bf957de
public port different webhook
jchowjr Apr 13, 2025
8bab3ff
Merge pull request #23 from Josral04/jenkins-githubintegration
jchowjr Apr 13, 2025
c4c2acf
Update Jenkinsfile
NatnaelTekli Apr 13, 2025
76fb097
fixed the jenkinsfile
NatnaelTekli Apr 13, 2025
2e8ab7a
Merge pull request #26 from Josral04/fix_jenkinfile
NatnaelTekli Apr 13, 2025
8384634
fixed the jenkins file
NatnaelTekli Apr 13, 2025
d4c5f95
Merge pull request #27 from Josral04/fix_jenkinfile
NatnaelTekli Apr 13, 2025
eff6909
fixed the static analysis part
NatnaelTekli Apr 13, 2025
cd8e758
Merge pull request #28 from Josral04/fix_jenkinfile
NatnaelTekli Apr 13, 2025
114c407
Update docker-compose.yaml
NatnaelTekli Apr 13, 2025
7d2b6f3
Update Jenkinsfile
NatnaelTekli Apr 13, 2025
3a6c404
Update Jenkinsfile
NatnaelTekli Apr 13, 2025
7080bec
Update Jenkinsfile
NatnaelTekli Apr 13, 2025
de28564
Update Jenkinsfile
NatnaelTekli Apr 13, 2025
d1bb57b
testing the trigger
NatnaelTekli Apr 14, 2025
88587a8
Merge pull request #29 from Josral04/fix_jenkinfile
NatnaelTekli Apr 14, 2025
9e8cb3f
Update Jenkinsfile
NatnaelTekli Apr 14, 2025
eaaf008
Update Jenkinsfile
NatnaelTekli Apr 14, 2025
4b14018
Update Jenkinsfile
NatnaelTekli Apr 14, 2025
394b93f
Update Jenkinsfile
NatnaelTekli Apr 14, 2025
31f91bb
Update Dockerfile
NatnaelTekli Apr 14, 2025
1689f4d
Update Dockerfile
NatnaelTekli Apr 14, 2025
3e59981
testing the jenkins webook
NatnaelTekli Apr 14, 2025
68132dc
first test
NatnaelTekli Apr 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,4 @@ node_modules/
.classpath
.project
.settings/
jenkins/jenkins_home/
77 changes: 77 additions & 0 deletions README(2).md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# ENSF 400 - Winter 2025 - Course Project

## Project Overview

In this project, you will work based on a software project by incorporating/extending a complete CI/CD (Continuous Integration/Continuous Deployment) pipeline. This is based on an open-source sample application: https://github.com/7ep/demo

This project can also be any application that requires the project of build, test, and deployment.
You will leverage GitHub for source control, Docker for containerizing your application, and a CI/CD tool (Jenkins) to automate the build, testing, and verification process. The goal is to validate every code change automatically through container builds, unit tests, code quality checks, and end-to-end functional tests. thank you


## Project Requirements

By the end of this project, your group must deliver the following:

1. Manage your project on GitHub and follow proper Git workflows (branching, pull requests, code reviews). Document the process of how you use Git workflows to collaborate with your team members.

1. Containerize your application for builds and deployments. Upload and download your container images to a public or private image repository (e.g., Docker Hub or GitHub Container Registry). Ensure a container image is built with unique build tag(s) matching the triggering commit from any branch.

1. Set up an automated CI/CD with Jenkins in a Codespace environment. Configure the pipeline to trigger upon pull requests merging changes into the main branch.

1. Document the CI/CD process and provide clear instructions on replicating your environment. Submit a video demo at the end of the project.

### Existing Pipelines

You will also demonstrate the delivery of the following process and artifacts that come with the project.

1. Run static analysis quality-gating using SonarQube
1. Performance testing with Jmeter
1. Security analysis with OWASP's "DependencyCheck"
1. Build Javadocs
___________________________________________________________________________________________________________________________________________________

# Organization of our ENSF 400 CI/CD Project

## Team Members

- Josral Frederick UCID: 30195360
- Muhammad Aun Raza My UCID: 30172183
- Natnael Tekli UCID: 30171167
- Jaden Chow UCID: 30173676

## Project Description
The main objective in this project is to create software that incorporates/extends a complete CI/CD
(Continuous Integration/Continuous Deployment) pipeline.

## Git Workflow
Our team follows a structured Git workflow to manage our project efficiently on GitHub.

We begin by cloning the repository using git clone <repository_url>. Before making changes, we create a new feature branch with git checkout -b feature/feature-name to keep our work organized.

Once changes are made, we stage and commit them using git add . and git commit -m "Description of changes", ensuring clear commit messages.

To keep our branch up-to-date, we sync it with the main branch by switching to main, pulling the latest changes (git pull origin main), and merging them into our feature branch (git merge main). If merge conflicts arise, we resolve them before proceeding.

After finalizing our changes, we push our branch to the remote repository using git push origin feature/feature-name. We then open a Pull Request (PR) on GitHub, providing a description of our modifications.

Team members participate in a code review process, leaving feedback and suggesting necessary improvements. Once approved, the PR is merged into main, typically by a team lead or someone with write access.

After merging, we delete the feature branch both locally (git branch -d feature/feature-name) and remotely (git push origin --delete feature/feature-name). To stay updated, we sync our local repository with the latest changes using git pull origin main.

We follow GitFlow best practices, using descriptive branch names (e.g., feature/login-page, bugfix/error-handling) and ensuring every change is reviewed via a PR before merging into main.
External contributors fork the repository, create a new branch, make their changes, and open a PR to contribute to the project.

This workflow ensures a structured and collaborative development process, keeping our codebase clean and organized.

## Containerization

To containerize our application, we use Docker and Docker Hub. After creating and reviewing the Dockerfile as a team, we build the Docker image with a unique tag matching the commit hash or branch name. This ensures traceability by linking each image to the exact code version it was built from. We generate the commit hash using COMMIT_HASH=$(git rev-parse --short HEAD), build the image with docker build -t natnaelt2/ensf400-demo:$COMMIT_HASH ., and push it to Docker Hub using docker push natnaelt2/ensf400-demo:$COMMIT_HASH. This process guarantees consistency and simplifies tracking across deployments.

To deploy the application, we pull the Docker image from Docker Hub using the command docker pull natnaelt2/ensf400-demo:commit-hash. Finally, we run the Docker container using the command docker run -p 8080:8080 natnaelt2/ensf400-demo:commit-hash. Then visit the application with your browser at http://localhost:8080/demo.

## Jenkins

we are testing the jenkins trigger



2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ plugins {

// gretty is a gradle plugin to make it easy to run a server and hotswap code at runtime.
// https://plugins.gradle.org/plugin/org.gretty
id 'org.gretty' version '3.0.4'
id 'org.gretty' version '3.1.5'

// provides access to a database versioning tool.
id "org.flywaydb.flyway" version "6.0.8"
Expand Down
50 changes: 50 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
services:
jenkins:
build: ./jenkins
privileged: true
user: root
ports:
- 8081:8080
- 50000:50000
container_name: jenkins
volumes:
- jenkins_home:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
networks:
- dev-network
depends_on:
- sonarqube

sonarqube:
image: sonarqube:8.9-community
container_name: sonarqube
environment:
- SONARQUBE_JDBC_URL=jdbc:postgresql://db:5432/sonar
- SONARQUBE_JDBC_USERNAME=sonar
- SONARQUBE_JDBC_PASSWORD=sonar
ports:
- "9000:9000"
volumes:
- sonarqube_data:/opt/sonarqube/data
networks:
- dev-network

db:
image: postgres:latest
container_name: sonar-db
environment:
- POSTGRES_USER=sonar
- POSTGRES_PASSWORD=sonar
- POSTGRES_DB=sonar
volumes:
- db_data:/var/lib/postgresql/data
networks:
- dev-network

networks:
dev-network:

volumes:
jenkins_home:
sonarqube_data:
db_data:
6 changes: 6 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM gradle:7.6.1-jdk11
WORKDIR /ensf400-demo
COPY . .
RUN ./gradlew build
EXPOSE 8080
CMD ["gradle", "appRun"]
Binary file modified docs/BDD_video.mp4
Binary file not shown.
23 changes: 23 additions & 0 deletions jenkins/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM jenkins/jenkins:alpine
USER root

RUN apk add --update docker openrc

RUN apk add --no-cache \
openjdk11 \
bash \
docker \
curl \
unzip \
py3-pip && \
pip3 install --break-system-packages pipenv
ENV GRADLE_VERSION=7.6
ENV GRADLE_HOME=/opt/gradle

RUN mkdir -p ${GRADLE_HOME} && \
curl -fsSL https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip -o /tmp/gradle.zip && \
unzip /tmp/gradle.zip -d /opt/gradle && \
rm /tmp/gradle.zip

ENV PATH="${GRADLE_HOME}/gradle-${GRADLE_VERSION}/bin:${PATH}"
RUN gradle -v
Loading