From a616a3468ea14f58c20af51c19b3dadbfb9f0474 Mon Sep 17 00:00:00 2001 From: NANCHARLA USHA RANI <137382463+usharaniwin@users.noreply.github.com> Date: Wed, 30 Apr 2025 16:38:16 -0500 Subject: [PATCH 1/8] Update pom.xml --- pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 4792a6c..ce9c17a 100644 --- a/pom.xml +++ b/pom.xml @@ -21,9 +21,9 @@ 5.3.34 4.11 1.2.17 - http://54.221.74.74:9000/ + http://54.234.215.68:9000/ admin - passw0rd + Sonar@123 UTF-8 UTF-8 @@ -98,13 +98,13 @@ nexus KK FUNDA Releases Nexus Repository - http://172.31.40.189:8081/repository/flipkart-release/ + http://44.223.67.93:8081/repository/war_release/ nexus KK FUNDA Snapshot Nexus Repository - http://172.31.40.189:8081/repository/flipkart-snapshot/ + http://44.223.67.93:8081/repository/War_snapshot/ From 2861b864f01f01cfc9a6a0374115ff6445c7fb84 Mon Sep 17 00:00:00 2001 From: NANCHARLA USHA RANI <137382463+usharaniwin@users.noreply.github.com> Date: Thu, 8 May 2025 23:14:48 -0500 Subject: [PATCH 2/8] Create Jenkins-scripted-PL --- Jenkins-scripted-PL | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Jenkins-scripted-PL diff --git a/Jenkins-scripted-PL b/Jenkins-scripted-PL new file mode 100644 index 0000000..5e39f83 --- /dev/null +++ b/Jenkins-scripted-PL @@ -0,0 +1,30 @@ +node { + def mavenHome = tool name: "maven3.9.9", type: 'maven' + + stage('Checkout') { + git branch: 'Devlop', credentialsId: '84b9e77b-9119-44b3-8f82-9239c7f2fc0f', + url: 'https://github.com/usharaniwin/maven-web-app-project.git' + } + stage('Compile') { + sh "${mavenHome}/bin/mvn clean compile" + } + stage('Build') { + sh "${mavenHome}/bin/mvn clean package" + } + stage('Sonar Report') { + sh "${mavenHome}/bin/mvn sonar:sonar" + } + stage('Deploy to Nexus') { + //curl -u admin:password123 http://3.92.105.74:8081/repository/abc-snapshot/ + sh "${mavenHome}/bin/mvn clean deploy" + } + stage('Deploy to Tomacat') + { + sh """ + curl -u svs:svs123 \ + --upload-file /var/lib/jenkins/workspace/Jenkins-PL/target/maven-web-application.war \ + "http://34.232.91.67:8080/manager/text/deploy?path=/maven-web-application&update=true" + """ + } + +} From c5488bd50cbe35aaf51cd8d8241d0b5bb9b95c8a Mon Sep 17 00:00:00 2001 From: NANCHARLA USHA RANI <137382463+usharaniwin@users.noreply.github.com> Date: Sat, 10 May 2025 12:55:03 -0500 Subject: [PATCH 3/8] Create Jenkins-Declarative-PL --- Jenkins-Declarative-PL | 55 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Jenkins-Declarative-PL diff --git a/Jenkins-Declarative-PL b/Jenkins-Declarative-PL new file mode 100644 index 0000000..4743aa1 --- /dev/null +++ b/Jenkins-Declarative-PL @@ -0,0 +1,55 @@ +pipeline { + agent any + + environment { + DEPLOY_SERVER = '34.232.91.67' + DEPLOY_USER = 'ec2-user' + DEPLOY_DIR = '/opt/tomcat/webapps/' + } + + tools { + maven 'maven3.9.9' + } + + stages { + + stage('Checkout') { + steps { + git branch: 'Devlop', credentialsId: '84b9e77b-9119-44b3-8f82-9239c7f2fc0f', url: 'https://github.com/usharaniwin/maven-web-app-project.git' + } + } + + stage('Build') { + steps { + sh 'mvn clean package' + } + } + + // Optional SonarQube Stage (commented out) + /* + stage('Sonar') { + steps { + sh 'mvn clean sonar:sonar' + } + } + */ + + stage('Nexus') { + steps { + sh 'mvn clean deploy' + } + } + + stage('SSH_Deploy') { + steps { + sshagent(['ssh-cred']) { + sh ''' + ssh -o StrictHostKeyChecking=no ${DEPLOY_USER}@${DEPLOY_SERVER} "sudo chmod -R 777 ${DEPLOY_DIR}" + scp -o StrictHostKeyChecking=no target/maven-web-application.war ${DEPLOY_USER}@${DEPLOY_SERVER}:/tmp/ + ssh -o StrictHostKeyChecking=no ${DEPLOY_USER}@${DEPLOY_SERVER} "sudo mv /tmp/maven-web-application.war ${DEPLOY_DIR}" + ''' + } + } + } + } +} From 7d8a5d9bcc5cab5c0d2d9ca5333f73617aab9a17 Mon Sep 17 00:00:00 2001 From: NANCHARLA USHA RANI <137382463+usharaniwin@users.noreply.github.com> Date: Mon, 12 May 2025 14:41:29 -0500 Subject: [PATCH 4/8] Create Jenkinsfie --- Jenkinsfie | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Jenkinsfie diff --git a/Jenkinsfie b/Jenkinsfie new file mode 100644 index 0000000..4743aa1 --- /dev/null +++ b/Jenkinsfie @@ -0,0 +1,55 @@ +pipeline { + agent any + + environment { + DEPLOY_SERVER = '34.232.91.67' + DEPLOY_USER = 'ec2-user' + DEPLOY_DIR = '/opt/tomcat/webapps/' + } + + tools { + maven 'maven3.9.9' + } + + stages { + + stage('Checkout') { + steps { + git branch: 'Devlop', credentialsId: '84b9e77b-9119-44b3-8f82-9239c7f2fc0f', url: 'https://github.com/usharaniwin/maven-web-app-project.git' + } + } + + stage('Build') { + steps { + sh 'mvn clean package' + } + } + + // Optional SonarQube Stage (commented out) + /* + stage('Sonar') { + steps { + sh 'mvn clean sonar:sonar' + } + } + */ + + stage('Nexus') { + steps { + sh 'mvn clean deploy' + } + } + + stage('SSH_Deploy') { + steps { + sshagent(['ssh-cred']) { + sh ''' + ssh -o StrictHostKeyChecking=no ${DEPLOY_USER}@${DEPLOY_SERVER} "sudo chmod -R 777 ${DEPLOY_DIR}" + scp -o StrictHostKeyChecking=no target/maven-web-application.war ${DEPLOY_USER}@${DEPLOY_SERVER}:/tmp/ + ssh -o StrictHostKeyChecking=no ${DEPLOY_USER}@${DEPLOY_SERVER} "sudo mv /tmp/maven-web-application.war ${DEPLOY_DIR}" + ''' + } + } + } + } +} From c911c3ac0664b986f1808a4b433499c8170af16a Mon Sep 17 00:00:00 2001 From: NANCHARLA USHA RANI <137382463+usharaniwin@users.noreply.github.com> Date: Mon, 12 May 2025 15:09:38 -0500 Subject: [PATCH 5/8] Create Jenkinsfile --- Jenkinsfile | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..4743aa1 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,55 @@ +pipeline { + agent any + + environment { + DEPLOY_SERVER = '34.232.91.67' + DEPLOY_USER = 'ec2-user' + DEPLOY_DIR = '/opt/tomcat/webapps/' + } + + tools { + maven 'maven3.9.9' + } + + stages { + + stage('Checkout') { + steps { + git branch: 'Devlop', credentialsId: '84b9e77b-9119-44b3-8f82-9239c7f2fc0f', url: 'https://github.com/usharaniwin/maven-web-app-project.git' + } + } + + stage('Build') { + steps { + sh 'mvn clean package' + } + } + + // Optional SonarQube Stage (commented out) + /* + stage('Sonar') { + steps { + sh 'mvn clean sonar:sonar' + } + } + */ + + stage('Nexus') { + steps { + sh 'mvn clean deploy' + } + } + + stage('SSH_Deploy') { + steps { + sshagent(['ssh-cred']) { + sh ''' + ssh -o StrictHostKeyChecking=no ${DEPLOY_USER}@${DEPLOY_SERVER} "sudo chmod -R 777 ${DEPLOY_DIR}" + scp -o StrictHostKeyChecking=no target/maven-web-application.war ${DEPLOY_USER}@${DEPLOY_SERVER}:/tmp/ + ssh -o StrictHostKeyChecking=no ${DEPLOY_USER}@${DEPLOY_SERVER} "sudo mv /tmp/maven-web-application.war ${DEPLOY_DIR}" + ''' + } + } + } + } +} From 73e55255d3032dd9f20127b43da80d3855049209 Mon Sep 17 00:00:00 2001 From: NANCHARLA USHA RANI <137382463+usharaniwin@users.noreply.github.com> Date: Mon, 12 May 2025 16:20:42 -0500 Subject: [PATCH 6/8] Update pom.xml --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index ce9c17a..b5e090b 100644 --- a/pom.xml +++ b/pom.xml @@ -98,13 +98,13 @@ nexus KK FUNDA Releases Nexus Repository - http://44.223.67.93:8081/repository/war_release/ + http://3.92.105.74:8081/repository/war_release/ nexus KK FUNDA Snapshot Nexus Repository - http://44.223.67.93:8081/repository/War_snapshot/ + http://3.92.105.74:8081/repository/War_snapshot/ From acc0fd033fbdb2c372d60971fe2529e615ac9fd1 Mon Sep 17 00:00:00 2001 From: NANCHARLA USHA RANI <137382463+usharaniwin@users.noreply.github.com> Date: Mon, 12 May 2025 23:39:45 -0500 Subject: [PATCH 7/8] Update pom.xml --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index b5e090b..b8681bd 100644 --- a/pom.xml +++ b/pom.xml @@ -98,13 +98,13 @@ nexus KK FUNDA Releases Nexus Repository - http://3.92.105.74:8081/repository/war_release/ + http://3.92.105.74:8081/repository/abc-release/ nexus KK FUNDA Snapshot Nexus Repository - http://3.92.105.74:8081/repository/War_snapshot/ + http://3.92.105.74:8081/repository/abc-snapshot/ From 2cea671ff2f377d037494a3e64e0a49dd2944704 Mon Sep 17 00:00:00 2001 From: NANCHARLA USHA RANI <137382463+usharaniwin@users.noreply.github.com> Date: Mon, 12 May 2025 23:51:56 -0500 Subject: [PATCH 8/8] Delete Jenkinsfie --- Jenkinsfie | 55 ------------------------------------------------------ 1 file changed, 55 deletions(-) delete mode 100644 Jenkinsfie diff --git a/Jenkinsfie b/Jenkinsfie deleted file mode 100644 index 4743aa1..0000000 --- a/Jenkinsfie +++ /dev/null @@ -1,55 +0,0 @@ -pipeline { - agent any - - environment { - DEPLOY_SERVER = '34.232.91.67' - DEPLOY_USER = 'ec2-user' - DEPLOY_DIR = '/opt/tomcat/webapps/' - } - - tools { - maven 'maven3.9.9' - } - - stages { - - stage('Checkout') { - steps { - git branch: 'Devlop', credentialsId: '84b9e77b-9119-44b3-8f82-9239c7f2fc0f', url: 'https://github.com/usharaniwin/maven-web-app-project.git' - } - } - - stage('Build') { - steps { - sh 'mvn clean package' - } - } - - // Optional SonarQube Stage (commented out) - /* - stage('Sonar') { - steps { - sh 'mvn clean sonar:sonar' - } - } - */ - - stage('Nexus') { - steps { - sh 'mvn clean deploy' - } - } - - stage('SSH_Deploy') { - steps { - sshagent(['ssh-cred']) { - sh ''' - ssh -o StrictHostKeyChecking=no ${DEPLOY_USER}@${DEPLOY_SERVER} "sudo chmod -R 777 ${DEPLOY_DIR}" - scp -o StrictHostKeyChecking=no target/maven-web-application.war ${DEPLOY_USER}@${DEPLOY_SERVER}:/tmp/ - ssh -o StrictHostKeyChecking=no ${DEPLOY_USER}@${DEPLOY_SERVER} "sudo mv /tmp/maven-web-application.war ${DEPLOY_DIR}" - ''' - } - } - } - } -}