From ae22b5a0ee28a58a507af591dada85201bf24428 Mon Sep 17 00:00:00 2001 From: Nishanth Date: Fri, 9 Jan 2026 10:35:55 +0530 Subject: [PATCH 1/6] Add files via upload --- jenkinsfile1 | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 jenkinsfile1 diff --git a/jenkinsfile1 b/jenkinsfile1 new file mode 100644 index 0000000000..128099b306 --- /dev/null +++ b/jenkinsfile1 @@ -0,0 +1,30 @@ +node +{ + mavenHome = tool name: 'Maven 3.9.12' + stage ('checkoutcodegit') + { + git branch: 'development', credentialsId: 'e19dbdde-5445-4170-9c4e-2f518493875a', url: 'https://github.com/nishanthsannagiri1518-gif/maven-web-application.git' + } + stage ('build') + { + sh "${mavenHome}/bin/mvn clean package" + } + stage ('sonarqubeanalysis') + { + withSonarQubeEnv('sonarqube') { + sh "${mavenHome}/bin/mvn sonar:sonar" + } + } + stage ('nexusrepositoryupload') + { + withCredentials([usernamePassword(credentialsId: 'nexus-cred', passwordVariable: 'NEXUS_PASSWD', usernameVariable: 'NEXUS_USER')]) { + sh "${mavenHome}/bin/mvn deploy " + } + } + stage ('deploywebapp') + { + sshagent(['a0312c7e-7e4f-410b-8408-508623b5b15c']) { + sh 'scp -o StrictHostKeyChecking=no target/maven-web-application.war ec2-user@52.73.233.9:/opt/tomcat/webapps/' + } + } +} \ No newline at end of file From d47fb9f24b79e50626c3271675496ff114f8f30c Mon Sep 17 00:00:00 2001 From: Nishanth Date: Fri, 9 Jan 2026 12:45:41 +0530 Subject: [PATCH 2/6] Update Jenkinsfile for deployment configuration --- jenkinsfile1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jenkinsfile1 b/jenkinsfile1 index 128099b306..bd7d05d269 100644 --- a/jenkinsfile1 +++ b/jenkinsfile1 @@ -23,8 +23,9 @@ node } stage ('deploywebapp') { - sshagent(['a0312c7e-7e4f-410b-8408-508623b5b15c']) { - sh 'scp -o StrictHostKeyChecking=no target/maven-web-application.war ec2-user@52.73.233.9:/opt/tomcat/webapps/' + sshagent(['379f77d7-e86d-47d1-8b11-5d5ae2bf7e1d']) { + sh 'scp -o StrictHostKeyChecking=no target/maven-web-application.war ec2-user@54.221.87.9:/opt/tomcat/webapps/' } } -} \ No newline at end of file + +} From f9c87f6f66f19526ba80b8781a660cdf44e2a954 Mon Sep 17 00:00:00 2001 From: Nishanth Date: Fri, 9 Jan 2026 13:28:23 +0530 Subject: [PATCH 3/6] Update repository URLs in pom.xml --- pom.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index cfc5be39ad..3389ae2b0c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,9 +21,11 @@ 5.1.2.RELEASE 4.11 1.2.17 + UTF-8 UTF-8 @@ -98,13 +100,13 @@ nexus Mithun Technologies Releases Nexus Repository - http://172.31.42.154:9980/mithuntechnologies/repository/canarabank-snapshot/ + http://54.242.30.99:8081/repository/flipkart-release/ nexus Mithun Technologies Snapshot Nexus Repository - http://172.31.42.154:9980/mithuntechnologies/repository/canarabank-release/ + http://34.230.4.212:8081/repository/flipkart-snapshot/ From 31393e23fadad9ab37a709da53a2710b135798ec Mon Sep 17 00:00:00 2001 From: Nishanth Date: Fri, 9 Jan 2026 13:33:37 +0530 Subject: [PATCH 4/6] Update snapshot repository URL in pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3389ae2b0c..3cf43ca80a 100644 --- a/pom.xml +++ b/pom.xml @@ -106,7 +106,7 @@ nexus Mithun Technologies Snapshot Nexus Repository - http://34.230.4.212:8081/repository/flipkart-snapshot/ + http://54.242.30.99:8081/repository/flipkart-snapshot/ From ebf44198cf7dbe58a1097d02daba574c8312af79 Mon Sep 17 00:00:00 2001 From: Nishanth Date: Fri, 9 Jan 2026 18:46:12 +0530 Subject: [PATCH 5/6] Update pom.xml From df283516354894b536e11306b094ad52057782fc Mon Sep 17 00:00:00 2001 From: Nishanth Date: Fri, 9 Jan 2026 19:31:27 +0530 Subject: [PATCH 6/6] Add debug-settings stage to Jenkins pipeline --- jenkinsfile1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jenkinsfile1 b/jenkinsfile1 index bd7d05d269..f05ff03659 100644 --- a/jenkinsfile1 +++ b/jenkinsfile1 @@ -1,6 +1,9 @@ node { mavenHome = tool name: 'Maven 3.9.12' + stage('debug-settings') { + sh "${mavenHome}/bin/mvn help:effective-settings" +} stage ('checkoutcodegit') { git branch: 'development', credentialsId: 'e19dbdde-5445-4170-9c4e-2f518493875a', url: 'https://github.com/nishanthsannagiri1518-gif/maven-web-application.git' @@ -29,3 +32,4 @@ node } } +