From d7b07b23aeba3971a20e44f19d135b48ceaafa6c Mon Sep 17 00:00:00 2001 From: Dhivyasdream <167981830+Dhivyasdream@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:05:26 +0530 Subject: [PATCH 1/2] Create my-app --- my-app | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 my-app diff --git a/my-app b/my-app new file mode 100644 index 0000000000..6611bdf0ce --- /dev/null +++ b/my-app @@ -0,0 +1,16 @@ +node{ + stage('SCM Checkout'){ + git 'https://github.com/Dhivyasdream/project1.git' + } + stage('compile-Package'){ + + def mvnHome = tool name: 'maven', type: 'maven' + sh "$(mvnHome}/bin/mvn clean package" + sh 'mv target/myweb*.war target/newapp.war' + } + stage('SonarQube Analysis') { + def mvnHome = tool name: 'maven', type: 'maven' + withSonarQubeenv('sonar') { + sh "${mvnHome}/bin/mvn sonar:sonar" + } + } From f54e84fc9181f5f77a6ae314552c7ffa7b8ae0e3 Mon Sep 17 00:00:00 2001 From: Dhivyasdream <167981830+Dhivyasdream@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:16:28 +0530 Subject: [PATCH 2/2] Update my-app --- my-app | 1 - 1 file changed, 1 deletion(-) diff --git a/my-app b/my-app index 6611bdf0ce..9cd5519625 100644 --- a/my-app +++ b/my-app @@ -3,7 +3,6 @@ node{ git 'https://github.com/Dhivyasdream/project1.git' } stage('compile-Package'){ - def mvnHome = tool name: 'maven', type: 'maven' sh "$(mvnHome}/bin/mvn clean package" sh 'mv target/myweb*.war target/newapp.war'