From 2174e7c0713df68712acb984708245b070049f76 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 1 Nov 2021 09:18:55 +0000 Subject: [PATCH 1/9] name pavan --- 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..e931ff30 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.pavan from Saidemy

+

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

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

From b66abe362294f63d8663e4758eba14b533618b1f Mon Sep 17 00:00:00 2001 From: machakiran <91630591+machakiran@users.noreply.github.com> Date: Mon, 1 Nov 2021 20:09:01 +0530 Subject: [PATCH 2/9] Create Jenkins --- Jenkins | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Jenkins diff --git a/Jenkins b/Jenkins new file mode 100644 index 00000000..4733af2e --- /dev/null +++ b/Jenkins @@ -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 eca060aab5a580edc3fa375d21942d5b76842930 Mon Sep 17 00:00:00 2001 From: machakiran <91630591+machakiran@users.noreply.github.com> Date: Mon, 1 Nov 2021 20:24:04 +0530 Subject: [PATCH 3/9] Update Jenkins --- Jenkins | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Jenkins b/Jenkins index 4733af2e..b363f38d 100644 --- a/Jenkins +++ b/Jenkins @@ -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/machakiran/SaiJavaCode.git' } } stage("Maven Build"){ steps{ sh "/opt/apache-maven-3.8.3/bin/mvn package" + sh "mv target/*.war target/myweb.war" } } stage("deploy-dev"){ steps{ - sshagent(['3.82.186.105']) { + sshagent(['18.206.249.222']) { 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/jenkins3/webapp/target/webapp.war ubuntu@18.206.249.222:/opt/apache-tomcat-9.0.54/webapps + ssh ubuntu@18.206.249.222/opt/apache-tomcat-9.0.54/bin/shutdown.sh + ssh ubuntu@18.206.249.222/opt/apache-tomcat-9.0.54/bin/startup.sh """ } } From 30d59c5eae0a1785902970b7bcc1a86c8f563198 Mon Sep 17 00:00:00 2001 From: machakiran <91630591+machakiran@users.noreply.github.com> Date: Mon, 1 Nov 2021 20:29:20 +0530 Subject: [PATCH 4/9] Update Jenkins --- Jenkins | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Jenkins b/Jenkins index b363f38d..320b75aa 100644 --- a/Jenkins +++ b/Jenkins @@ -9,16 +9,15 @@ pipeline{ stage("Maven Build"){ steps{ sh "/opt/apache-maven-3.8.3/bin/mvn package" - sh "mv target/*.war target/myweb.war" } } stage("deploy-dev"){ steps{ sshagent(['18.206.249.222']) { sh """ - scp -o StrictHostKeyChecking=no /var/lib/jenkins/workspace/jenkins3/webapp/target/webapp.war ubuntu@18.206.249.222:/opt/apache-tomcat-9.0.54/webapps - ssh ubuntu@18.206.249.222/opt/apache-tomcat-9.0.54/bin/shutdown.sh - ssh ubuntu@18.206.249.222/opt/apache-tomcat-9.0.54/bin/startup.sh + scp -o StrictHostKeyChecking=no /var/lib/jenkins/workspace/jenkins3/webapp/target/webapp.war ubuntu@18.206.249.222:/opt/apache-tomcat-8.5.72/webapps + ssh ubuntu@18.206.249.222/opt/apache-tomcat-8.5.72/bin/shutdown.sh + ssh ubuntu@18.206.249.222/opt/apache-tomcat-8.5.72/bin/startup.sh """ } } From b1ef153ced0c31795aca567c9c6fcf0bc619eaed Mon Sep 17 00:00:00 2001 From: machakiran <91630591+machakiran@users.noreply.github.com> Date: Mon, 1 Nov 2021 20:33:54 +0530 Subject: [PATCH 5/9] 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..320b75aa --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,26 @@ +pipeline{ + agent any + stages{ + stage("Git Checkout"){ + steps{ + git credentialsId: 'github', url: 'https://github.com/machakiran/SaiJavaCode.git' + } + } + stage("Maven Build"){ + steps{ + sh "/opt/apache-maven-3.8.3/bin/mvn package" + } + } + stage("deploy-dev"){ + steps{ + sshagent(['18.206.249.222']) { + sh """ + scp -o StrictHostKeyChecking=no /var/lib/jenkins/workspace/jenkins3/webapp/target/webapp.war ubuntu@18.206.249.222:/opt/apache-tomcat-8.5.72/webapps + ssh ubuntu@18.206.249.222/opt/apache-tomcat-8.5.72/bin/shutdown.sh + ssh ubuntu@18.206.249.222/opt/apache-tomcat-8.5.72/bin/startup.sh + """ + } + } + } + } + } From 9acb190e1e254d3415943a056f9d44eda265b51e Mon Sep 17 00:00:00 2001 From: machakiran <91630591+machakiran@users.noreply.github.com> Date: Mon, 1 Nov 2021 20:40:54 +0530 Subject: [PATCH 6/9] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 320b75aa..3553f199 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,8 +16,8 @@ pipeline{ sshagent(['18.206.249.222']) { sh """ scp -o StrictHostKeyChecking=no /var/lib/jenkins/workspace/jenkins3/webapp/target/webapp.war ubuntu@18.206.249.222:/opt/apache-tomcat-8.5.72/webapps - ssh ubuntu@18.206.249.222/opt/apache-tomcat-8.5.72/bin/shutdown.sh - ssh ubuntu@18.206.249.222/opt/apache-tomcat-8.5.72/bin/startup.sh + ssh ubuntu@18.206.249.222 /opt/apache-tomcat-8.5.72/bin/shutdown.sh + ssh ubuntu@18.206.249.222 /opt/apache-tomcat-8.5.72/bin/startup.sh """ } } From 47a5bdeb0c883d25941e73b318e6b26be8c4f094 Mon Sep 17 00:00:00 2001 From: machakiran <91630591+machakiran@users.noreply.github.com> Date: Mon, 1 Nov 2021 20:51:54 +0530 Subject: [PATCH 7/9] 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 e931ff30..9786adc8 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.pavan from Saidemy

-

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

+

By Mr.sree from Saidemy

+

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

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

From f688417253b44241a6ab73565ed82b39ea8e6be9 Mon Sep 17 00:00:00 2001 From: machakiran <91630591+machakiran@users.noreply.github.com> Date: Mon, 1 Nov 2021 20:53:45 +0530 Subject: [PATCH 8/9] Update index.jsp --- webapp/src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/src/main/webapp/index.jsp b/webapp/src/main/webapp/index.jsp index 9786adc8..300cb1cd 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.sree from Saidemy

-

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

+

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

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

From d8c0a785c5c95bf43c72f6dca46abc779e88a688 Mon Sep 17 00:00:00 2001 From: machakiran <91630591+machakiran@users.noreply.github.com> Date: Mon, 1 Nov 2021 21:44:58 +0530 Subject: [PATCH 9/9] Update index.jsp --- webapp/src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/src/main/webapp/index.jsp b/webapp/src/main/webapp/index.jsp index 300cb1cd..9786adc8 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.sree from Saidemy

-

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

+

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

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