diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml
new file mode 100644
index 0000000..d7dfe6b
--- /dev/null
+++ b/.github/workflows/maven.yaml
@@ -0,0 +1,66 @@
+
+name: CICD
+
+on:
+ push:
+ branches: [ "Dev" ]
+ pull_request:
+ branches: [ "Dev" ]
+
+jobs:
+ build:
+
+ runs-on: self-hosted
+
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up JDK 17
+ uses: actions/setup-java@v3
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+ cache: maven
+ - name: Build with Maven
+ run: mvn package --file pom.xml
+
+ - name: Trivy FS scan
+ run: trivy fs --format table -o fs.html .
+
+ - name: SonarQube Scan
+ uses: sonarsource/sonarqube-scan-action@master
+ 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
+ run: |
+ docker build -t ganeshsnp987/devtaskmaster:latest .
+
+ - name: Trivy Image scan
+ run: trivy image --format table -o image.html ganeshsnp987/devtaskmaster: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 ganeshsnp987/devtaskmaster:latest
+
+ - name: Kubectl Action
+ uses: tale/kubectl-action@v1
+ with:
+ base64-kube-config: ${{ secrets.KUBE_CONFIG }}
+ - run: |
+ kubectl apply -f deployment-service.yml
+
+
+
diff --git a/deployment-service.yml b/deployment-service.yml
index a5ff7fd..bdb9fe3 100644
--- a/deployment-service.yml
+++ b/deployment-service.yml
@@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: taskmaster
- image: adijaiswal/taskmaster:latest # Image that will be used to containers in the cluster
+ image: ganeshsnp987/dev-taskmaster: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
diff --git a/pom.xml b/pom.xml
index 182532b..428c0c6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -103,11 +103,11 @@