Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ccba38f
Create test.txt
redhatcluster77 Jul 14, 2025
93e1332
Create cicd.yml
redhatcluster77 Jul 17, 2025
5ec0a4a
Update cicd.yml
redhatcluster77 Jul 17, 2025
e28b2b5
Update deployment-service.yaml
redhatcluster77 Jul 17, 2025
4b8d0ef
Update cicd.yml
redhatcluster77 Jul 17, 2025
66d74f4
Update cicd.yml
redhatcluster77 Jul 17, 2025
5487f5e
Update cicd.yml
redhatcluster77 Jul 17, 2025
745119c
Update cicd.yml
redhatcluster77 Jul 18, 2025
98890c1
Update cicd.yml
redhatcluster77 Jul 18, 2025
cc1f58a
Update cicd.yml
redhatcluster77 Jul 18, 2025
a93dcd2
Delete .github/workflows/maven2.yml
redhatcluster77 Jul 18, 2025
ca8a8e0
Delete .github/workflows/maven.yml
redhatcluster77 Jul 18, 2025
3221508
Update pom.xml
redhatcluster77 Jul 28, 2025
b9aea38
Update pom.xml
redhatcluster77 Jul 28, 2025
409e4a7
Update Dockerfile
redhatcluster77 Jul 29, 2025
d65cafb
Update Dockerfile
redhatcluster77 Jul 29, 2025
07ff689
Update Dockerfile
redhatcluster77 Jul 29, 2025
529503e
Update pom.xml
redhatcluster77 Aug 1, 2025
4f2d822
Update Dockerfile
redhatcluster77 Aug 1, 2025
db7fd5f
Update Dockerfile
redhatcluster77 Aug 1, 2025
65a9d30
Update Dockerfile
redhatcluster77 Aug 2, 2025
b8547f7
Update Dockerfile
redhatcluster77 Aug 2, 2025
84f2f8c
Update Dockerfile
redhatcluster77 Aug 2, 2025
3b5dbde
Update Dockerfile
redhatcluster77 Aug 2, 2025
ff3c8f1
Update Dockerfile
redhatcluster77 Aug 2, 2025
a18d7e6
Update Dockerfile
redhatcluster77 Aug 21, 2025
7e883c3
Update Dockerfile
redhatcluster77 Aug 21, 2025
bee0198
Update pom.xml
redhatcluster77 Aug 24, 2025
fb35529
Update Dockerfile
redhatcluster77 Aug 24, 2025
c66f3a0
Update Dockerfile
redhatcluster77 Aug 25, 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
94 changes: 94 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: CICD Pipeline

on:
push:
branches: [ "main" ]

jobs:
build:

runs-on: self-hosted

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Install Maven
run: |
sudo apt-get update
sudo apt-get install -y maven

- name: Build with Maven
run: mvn package --file pom.xml

- uses: actions/upload-artifact@v4
with:
name: Boardgame
path: target/*.jar

- name: Install Trivy
run: |
sudo apt-get install -y wget apt-transport-https gnupg lsb-release
curl -fsSL https://aquasecurity.github.io/trivy-repo/deb/public.key | gpg --dearmor | sudo tee /usr/share/keyrings/trivy.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/trivy.gpg] https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/trivy.list > /dev/null
sudo apt-get update
sudo apt-get install -y trivy

- name: Trivy FS Scan
run:
trivy fs --format table -o trivy-fs-report.html .

- name: Install unzip
run: sudo apt-get update && sudo apt-get install -y unzip jq maven

- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

- name: SonarQube Quality Gate check
id: sonarqube-quality-gate-check
uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Docker Image
timeout-minutes: 20
run: |
docker build -t nuruzzaman24x/boardgame:latest .

- name: Trivy Image Scan
run: |
trivy image --format table -o trivy-image-report.html nuruzzaman24x/boardgame:latest

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Push Docker Image
run: |
docker push nuruzzaman24x/boardgame:latest

- name: Kubectl Action
uses: tale/kubectl-action@v1
with:
base64-kube-config: ${{ secrets.KUBE_CONFIG }}
- run: |
kubectl apply -f deployment-service.yaml -n webapps
kubectl get svc -n webapps

72 changes: 0 additions & 72 deletions .github/workflows/maven.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/maven2.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM openjdk:17-alpine
FROM adoptopenjdk/openjdk11

EXPOSE 8080

ENV APP_HOME /usr/src/app

COPY target/*.jar $APP_HOME/app.jar
COPY artifact/*.jar $APP_HOME/app.jar

WORKDIR $APP_HOME

Expand Down
2 changes: 1 addition & 1 deletion deployment-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: boardgame
image: adijaiswal/boardshack:latest # Image that will be used to containers in the cluster
image: nuruzzaman24x/boardgame:latest # Image that will be used to containers in the cluster
imagePullPolicy: Always
ports:
- containerPort: 8080 # The port that the container is running on in the cluster
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>com.javaproject</groupId>
<artifactId>database_service_project</artifactId>
<version>0.0.7-SNAPSHOT</version>
<version>0.0.6</version>
<name>database_service_project</name>
<description>Project for Spring Boot</description>
<packaging>jar</packaging>
Expand Down Expand Up @@ -120,11 +120,11 @@
<distributionManagement>
<repository>
<id>maven-releases</id>
<url>http://13.201.64.186:8081/repository/maven-releases/</url>
<url>http://172.17.0.232:8081/repository/maven-releases</url>
</repository>
<snapshotRepository>
<id>maven-snapshots</id>
<url>http://13.201.64.186:8081/repository/maven-snapshots/</url>
<url>http://172.17.0.232:8081/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>

Expand Down
1 change: 1 addition & 0 deletions test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
aditya jaiswal