From 71d59a6f6a606e0483895d4f4ec6205e99ea04d4 Mon Sep 17 00:00:00 2001 From: jai Date: Mon, 11 Oct 2021 11:50:21 +0000 Subject: [PATCH 1/8] modified --- webapp/src/main/webapp/index.jsp | 2 -- 1 file changed, 2 deletions(-) diff --git a/webapp/src/main/webapp/index.jsp b/webapp/src/main/webapp/index.jsp index b93fc246..14b29dc4 100644 --- a/webapp/src/main/webapp/index.jsp +++ b/webapp/src/main/webapp/index.jsp @@ -1,5 +1,3 @@

Hello Dear Students !!, Welcome to DevOps Project-2 !!

By Mr.Hari from Saidemy

It's time to start the DevOps Project-2 by Mr.Hari!!

-

This is what complete End-to-End CI-CD pipeline DevOps Project!!

-

We are done with DevOps Project-2

From eb22a0cacf37d4ff6a9699594bed3433cb78e73b Mon Sep 17 00:00:00 2001 From: jai Date: Mon, 11 Oct 2021 18:22:03 +0000 Subject: [PATCH 2/8] modified --- webapp/src/main/webapp/index.jsp | 1 + 1 file changed, 1 insertion(+) diff --git a/webapp/src/main/webapp/index.jsp b/webapp/src/main/webapp/index.jsp index 14b29dc4..bc70c891 100644 --- a/webapp/src/main/webapp/index.jsp +++ b/webapp/src/main/webapp/index.jsp @@ -1,3 +1,4 @@

Hello Dear Students !!, Welcome to DevOps Project-2 !!

By Mr.Hari from Saidemy

It's time to start the DevOps Project-2 by Mr.Hari!!

+

This is what complete End-to-End CI-CD pipeline Devops project!!

From 16626890ffb27f60b3a5004149adc2da3a2f975b Mon Sep 17 00:00:00 2001 From: jai Date: Mon, 1 Nov 2021 09:21:13 +0000 Subject: [PATCH 3/8] modified --- webapp/src/main/webapp/index.jsp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/src/main/webapp/index.jsp b/webapp/src/main/webapp/index.jsp index bc70c891..99baafda 100644 --- a/webapp/src/main/webapp/index.jsp +++ b/webapp/src/main/webapp/index.jsp @@ -1,4 +1,4 @@

Hello Dear Students !!, Welcome to DevOps Project-2 !!

-

By Mr.Hari from Saidemy

-

It's time to start the DevOps Project-2 by Mr.Hari!!

+

By Mr.Jai from Saidemy

+

It's time to start the DevOps Project-2 by Mr.jai!!

This is what complete End-to-End CI-CD pipeline Devops project!!

From 143259b655b9bc8d3deb8a82670246d058baa634 Mon Sep 17 00:00:00 2001 From: maniumjayaraj <86461341+maniumjayaraj@users.noreply.github.com> Date: Mon, 1 Nov 2021 20:08:56 +0530 Subject: [PATCH 4/8] Create Jenkinsfile --- Jenkinsfile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..4733af2e --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,26 @@ +pipeline{ + agent any + stages{ + stage("Git Checkout"){ + steps{ + git credentialsId: 'github', url: 'https://github.com/sree141/SaiJavaCode.git' + } + } + stage("Maven Build"){ + steps{ + sh "/opt/apache-maven-3.8.3/bin/mvn package" + } + } + stage("deploy-dev"){ + steps{ + sshagent(['3.82.186.105']) { + sh """ + scp -o StrictHostKeyChecking=no /var/lib/jenkins/workspace/sree55/webapp/target/webapp.war ubuntu@3.82.186.105:/opt/apache-tomcat-9.0.54/webapps + ssh ubuntu@3.82.186.105 /opt/apache-tomcat-9.0.54/bin/shutdown.sh + ssh ubuntu@3.82.186.105 /opt/apache-tomcat-9.0.54/bin/startup.sh + """ + } + } + } + } + } From 81f6702d5c22c83f2c209e3f778527fc54f28efd Mon Sep 17 00:00:00 2001 From: maniumjayaraj <86461341+maniumjayaraj@users.noreply.github.com> Date: Mon, 1 Nov 2021 20:23:55 +0530 Subject: [PATCH 5/8] Update Jenkinsfile --- Jenkinsfile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4733af2e..cabef6d3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,21 +3,22 @@ pipeline{ stages{ stage("Git Checkout"){ steps{ - git credentialsId: 'github', url: 'https://github.com/sree141/SaiJavaCode.git' + git credentialsId: 'github', url: 'https://github.com/maniumjayaraj/SaiJavaCode.git' } } stage("Maven Build"){ steps{ - sh "/opt/apache-maven-3.8.3/bin/mvn package" + sh "/opt/maven/bin/mvn package" + sh "mv target/*.war target/myweb.war" } } stage("deploy-dev"){ steps{ - sshagent(['3.82.186.105']) { + sshagent(['3.6.41.252']) { sh """ - scp -o StrictHostKeyChecking=no /var/lib/jenkins/workspace/sree55/webapp/target/webapp.war ubuntu@3.82.186.105:/opt/apache-tomcat-9.0.54/webapps - ssh ubuntu@3.82.186.105 /opt/apache-tomcat-9.0.54/bin/shutdown.sh - ssh ubuntu@3.82.186.105 /opt/apache-tomcat-9.0.54/bin/startup.sh + scp -o StrictHostKeyChecking=no /var/lib/jenkins/workspace/jai/webapp/target/webapp.war ec2-user@3.6.41.252:/opt/apache-tomcat-9.0.54/webapps + ssh ec2-user@3.6.41.252 /tomcat/bin/shutdown.sh + ssh ec2-user@3.6.41.252 /tomcat/bin/startup.sh """ } } From 2507db6da587669d3dc57b0eca485c05ab1c44f3 Mon Sep 17 00:00:00 2001 From: maniumjayaraj <86461341+maniumjayaraj@users.noreply.github.com> Date: Mon, 1 Nov 2021 20:29:17 +0530 Subject: [PATCH 6/8] Update Jenkinsfile --- Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index cabef6d3..3fb85ad4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,6 @@ pipeline{ stage("Maven Build"){ steps{ sh "/opt/maven/bin/mvn package" - sh "mv target/*.war target/myweb.war" } } stage("deploy-dev"){ From fd36a4974d7379b51a460c33e0ee846ae547e64d Mon Sep 17 00:00:00 2001 From: maniumjayaraj <86461341+maniumjayaraj@users.noreply.github.com> Date: Mon, 1 Nov 2021 20:31:21 +0530 Subject: [PATCH 7/8] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3fb85ad4..73139373 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,7 +15,7 @@ pipeline{ steps{ sshagent(['3.6.41.252']) { sh """ - scp -o StrictHostKeyChecking=no /var/lib/jenkins/workspace/jai/webapp/target/webapp.war ec2-user@3.6.41.252:/opt/apache-tomcat-9.0.54/webapps + scp -o StrictHostKeyChecking=no /var/lib/jenkins/workspace/jai/webapp/target/webapp.war ec2-user@3.6.41.252:/tomcat/webapps ssh ec2-user@3.6.41.252 /tomcat/bin/shutdown.sh ssh ec2-user@3.6.41.252 /tomcat/bin/startup.sh """ From 8c11b3f89a82cb1ead686cf1bbe9df010af82788 Mon Sep 17 00:00:00 2001 From: maniumjayaraj <86461341+maniumjayaraj@users.noreply.github.com> Date: Mon, 1 Nov 2021 20:51:49 +0530 Subject: [PATCH 8/8] Update index.jsp --- webapp/src/main/webapp/index.jsp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/src/main/webapp/index.jsp b/webapp/src/main/webapp/index.jsp index 99baafda..3d025f92 100644 --- a/webapp/src/main/webapp/index.jsp +++ b/webapp/src/main/webapp/index.jsp @@ -1,4 +1,4 @@

Hello Dear Students !!, Welcome to DevOps Project-2 !!

-

By Mr.Jai from Saidemy

-

It's time to start the DevOps Project-2 by Mr.jai!!

+

By Mr.Jai raj from Saidemy

+

It's time to start the DevOps Project-2 by Mr.jai raj!!

This is what complete End-to-End CI-CD pipeline Devops project!!