From 0d8eddbe7ae272146e41373d5eee1d3a46bbfbc8 Mon Sep 17 00:00:00 2001 From: Ramlu <39337840+Ramlu@users.noreply.github.com> Date: Tue, 13 May 2025 21:30:06 +0530 Subject: [PATCH 01/10] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 19a32321..6ee98373 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ - 17 + 21 0.8.7 jacoco reuseReports From a4a7ee67054b98e824c413e3adf275015300866f Mon Sep 17 00:00:00 2001 From: Ramlu <39337840+Ramlu@users.noreply.github.com> Date: Tue, 13 May 2025 21:56:20 +0530 Subject: [PATCH 02/10] Update pom.xml --- pom.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pom.xml b/pom.xml index 6ee98373..7afeda52 100644 --- a/pom.xml +++ b/pom.xml @@ -86,6 +86,16 @@ spring-boot-maven-plugin + org.apache.maven.plugins + maven-compiler-plugin + 3.13.0 + + ${java.version} + ${java.version} + ${java.version} + + + org.jacoco jacoco-maven-plugin ${jacoco.version} From fc7651e198f124c9cf77534e2a3ebebae3f57293 Mon Sep 17 00:00:00 2001 From: Ramlu <39337840+Ramlu@users.noreply.github.com> Date: Tue, 13 May 2025 22:04:43 +0530 Subject: [PATCH 03/10] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7afeda52..62392d0e 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ 21 - 0.8.7 + 0.8.11 jacoco reuseReports ${project.basedir}/../target/jacoco.exec From b7901317a62cb7b2e802b389119016111cb2a60e Mon Sep 17 00:00:00 2001 From: Ramlu <39337840+Ramlu@users.noreply.github.com> Date: Tue, 13 May 2025 22:13:15 +0530 Subject: [PATCH 04/10] Update pom.xml --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 62392d0e..6e214563 100644 --- a/pom.xml +++ b/pom.xml @@ -122,11 +122,11 @@ maven-releases - http://13.233.143.130:8081/repository/maven-releases/ + http://3.108.60.10:8081/repository/maven-releases/ maven-snapshots - http://13.233.143.130:8081/repository/maven-snapshots/ + http://3.108.60.10:8081/repository/maven-snapshots/ From be8432c6107e4820ef8f860a8324ba4f9f1bd99b Mon Sep 17 00:00:00 2001 From: Ramlu <39337840+Ramlu@users.noreply.github.com> Date: Tue, 13 May 2025 22:32:50 +0530 Subject: [PATCH 05/10] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6e214563..73e7546a 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.example bankapp - 0.0.1-SNAPSHOT + 0.0.1 bankapp Banking Web Application From 54d1c0e1795023cee1f54fede18e31b38595df4f Mon Sep 17 00:00:00 2001 From: Ramlu <39337840+Ramlu@users.noreply.github.com> Date: Tue, 13 May 2025 22:34:18 +0530 Subject: [PATCH 06/10] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 73e7546a..6e214563 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.example bankapp - 0.0.1 + 0.0.1-SNAPSHOT bankapp Banking Web Application From 246840c1d807286abc65157df6af78e8c5b18f7e Mon Sep 17 00:00:00 2001 From: Naveen Date: Tue, 13 May 2025 23:32:57 +0530 Subject: [PATCH 07/10] added the Jenkinsfile --- Jenkinsfile | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..25294989 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,53 @@ +pipeline { + agent any + tools { + maven 'maven3' + jdk 'jdk-21' + } + environment { + SONAR_HOME = tool 'sonar-scanner' + } + stages { + stage('checkout') { + steps { + git branch: 'main', credentialsId: 'github', url: 'https://github.com/Ramlu/Multi-Tier-With-Database.git' + } + } + stage('Compile') { + steps { + sh 'mvn clean compile' + } + } + stage('Test') { + steps { + sh 'mvn test' + } + } + stage('Sonar Analysis') { + steps { + withSonarQubeEnv('sonar-server') { + sh "${SONAR_HOME}/bin/sonar-scanner " + + "-Dsonar.projectKey=bankapp " + + "-Dsonar.projectName=BankApp " + + "-Dsonar.sources=src/main/java " + + "-Dsonar.tests=src/test/java " + + "-Dsonar.java.binaries=target/classes " + + "-Dsonar.junit.reportPaths=target/surefire-reports " + + "-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml" + } + } + } + // stage('Deploy') { + // steps { + // withMaven(globalMavenSettingsConfig: '5ecbebcf-4fa0-413f-a9de-1cd928c6b445', jdk: 'jdk-21', maven: 'maven3', mavenSettingsConfig: '', traceability: true) { + // sh 'mvn deploy' + // } + // } + // } + stage('Package') { + steps { + sh 'mvn package' + } + } + } +} \ No newline at end of file From ff735393ac304a820e8f82b1451991df5697c18b Mon Sep 17 00:00:00 2001 From: Naveen Date: Tue, 13 May 2025 23:39:58 +0530 Subject: [PATCH 08/10] removed the sonar --- Jenkinsfile | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 25294989..ff9ec899 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -22,21 +22,22 @@ pipeline { steps { sh 'mvn test' } + } - stage('Sonar Analysis') { - steps { - withSonarQubeEnv('sonar-server') { - sh "${SONAR_HOME}/bin/sonar-scanner " + - "-Dsonar.projectKey=bankapp " + - "-Dsonar.projectName=BankApp " + - "-Dsonar.sources=src/main/java " + - "-Dsonar.tests=src/test/java " + - "-Dsonar.java.binaries=target/classes " + - "-Dsonar.junit.reportPaths=target/surefire-reports " + - "-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml" - } - } - } + // stage('Sonar Analysis') { + // steps { + // withSonarQubeEnv('sonar-server') { + // sh "${SONAR_HOME}/bin/sonar-scanner " + + // "-Dsonar.projectKey=bankapp " + + // "-Dsonar.projectName=BankApp " + + // "-Dsonar.sources=src/main/java " + + // "-Dsonar.tests=src/test/java " + + // "-Dsonar.java.binaries=target/classes " + + // "-Dsonar.junit.reportPaths=target/surefire-reports " + + // "-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml" + // } + // } + // } // stage('Deploy') { // steps { // withMaven(globalMavenSettingsConfig: '5ecbebcf-4fa0-413f-a9de-1cd928c6b445', jdk: 'jdk-21', maven: 'maven3', mavenSettingsConfig: '', traceability: true) { From 98a6b68a89eeb39bf74721e9079cc0416aef8b46 Mon Sep 17 00:00:00 2001 From: Naveen Date: Tue, 13 May 2025 23:49:25 +0530 Subject: [PATCH 09/10] trivy added --- Jenkinsfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ff9ec899..79d962ca 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,10 +20,14 @@ pipeline { } stage('Test') { steps { - sh 'mvn test' + sh 'mvn test -DSkipTests' } - } + stage('Scan') { + steps { + sh 'triy fs --format table -o fs.html .' + } + } // stage('Sonar Analysis') { // steps { // withSonarQubeEnv('sonar-server') { From fd9e67617d4784e579fa267adb60ec3c3925bbfb Mon Sep 17 00:00:00 2001 From: Naveen Date: Tue, 13 May 2025 23:51:16 +0530 Subject: [PATCH 10/10] updated the triv to trivy --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 79d962ca..62cc896f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,7 +25,7 @@ pipeline { } stage('Scan') { steps { - sh 'triy fs --format table -o fs.html .' + sh 'trivy fs --format table -o fs.html .' } } // stage('Sonar Analysis') {