From 6f201d7841b9cf5416be06413a3cc3eb1c123300 Mon Sep 17 00:00:00 2001 From: carreerit Date: Thu, 20 Jul 2017 22:24:46 +0530 Subject: [PATCH 01/28] Update index.jsp --- WebContent/index.jsp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/WebContent/index.jsp b/WebContent/index.jsp index 9fa0ccc5..ecf2b802 100644 --- a/WebContent/index.jsp +++ b/WebContent/index.jsp @@ -23,6 +23,10 @@ div.ex { Student Name + + Student Father Name + + Student Address From 9a3fae308993325f8b4e9358f8f441f315dfa38d Mon Sep 17 00:00:00 2001 From: carreerit Date: Fri, 21 Jul 2017 22:10:30 +0530 Subject: [PATCH 02/28] Update index.jsp --- WebContent/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebContent/index.jsp b/WebContent/index.jsp index ecf2b802..23c5f966 100644 --- a/WebContent/index.jsp +++ b/WebContent/index.jsp @@ -20,7 +20,7 @@ div.ex {
- + From 1bd08a44bf0451fcd9e8a97a699e64cb0883a901 Mon Sep 17 00:00:00 2001 From: carreerit Date: Mon, 31 Jul 2017 22:12:24 +0530 Subject: [PATCH 03/28] Update index.jsp --- WebContent/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebContent/index.jsp b/WebContent/index.jsp index 23c5f966..5d19d508 100644 --- a/WebContent/index.jsp +++ b/WebContent/index.jsp @@ -28,7 +28,7 @@ div.ex { - + From e269698627085151b756bdec6375d7fccca01d56 Mon Sep 17 00:00:00 2001 From: carreerit Date: Fri, 8 Sep 2017 07:07:47 +0530 Subject: [PATCH 04/28] Update pom.xml --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 8c86fccc..dcf49873 100644 --- a/pom.xml +++ b/pom.xml @@ -29,12 +29,12 @@ deployment Internal Releases - http://10.128.0.9:8081/repository/maven-releases/ + http://172.31.13.251:8081/repository/maven-releases/ deployment Internal Snapshot Releases - http://10.128.0.9:8081/repository/maven-snapshots/ + http://172.31.13.251:8081/repository/maven-snapshots/ From 69f843de995dccddbd62ee465f410486fb1a829e Mon Sep 17 00:00:00 2001 From: carreerit Date: Fri, 8 Sep 2017 07:10:49 +0530 Subject: [PATCH 05/28] Update index.jsp --- WebContent/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebContent/index.jsp b/WebContent/index.jsp index 5d19d508..49b372c5 100644 --- a/WebContent/index.jsp +++ b/WebContent/index.jsp @@ -20,7 +20,7 @@ div.ex {
Student NameStudent Full Name
Student AddressStudent Permanent Address
- + From 3623d414412c91b55b371b8fd2f572364f3dbb2a Mon Sep 17 00:00:00 2001 From: carreerit Date: Mon, 11 Sep 2017 06:59:47 +0530 Subject: [PATCH 06/28] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dcf49873..f62ee837 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.jdevs studentapp - 2.1.1-SNAPSHOT + 2.1.2-SNAPSHOT war src From 363d69a1f397a9c07a325a962bd167513dca0c69 Mon Sep 17 00:00:00 2001 From: carreerit Date: Tue, 12 Sep 2017 06:47:07 +0530 Subject: [PATCH 07/28] Update index.jsp --- WebContent/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebContent/index.jsp b/WebContent/index.jsp index 49b372c5..5d19d508 100644 --- a/WebContent/index.jsp +++ b/WebContent/index.jsp @@ -20,7 +20,7 @@ div.ex {
Student Full NameStudent First Name
- + From c55405b1e1662a7fba69bf8c3cd7ffe6bd3cfdb3 Mon Sep 17 00:00:00 2001 From: carreerit Date: Tue, 12 Sep 2017 07:00:10 +0530 Subject: [PATCH 08/28] Update index.jsp --- WebContent/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebContent/index.jsp b/WebContent/index.jsp index 5d19d508..a2c04846 100644 --- a/WebContent/index.jsp +++ b/WebContent/index.jsp @@ -20,7 +20,7 @@ div.ex {
Student First NameStudent Full Name
- + From 69de2077b905abf1722e6174dc1a79f836f0b8c6 Mon Sep 17 00:00:00 2001 From: Raghu K Date: Mon, 16 Oct 2017 01:11:27 +0000 Subject: [PATCH 09/28] Updated pom.xml from version 2.1-snap to 2.2 snap --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f62ee837..166574e5 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.jdevs studentapp - 2.1.2-SNAPSHOT + 2.2-SNAPSHOT war src From 7cf4b631f1a1c2aff04c4a80bf8cc85c989d2107 Mon Sep 17 00:00:00 2001 From: carreerit Date: Fri, 27 Oct 2017 06:41:14 +0530 Subject: [PATCH 10/28] Update pom.xml --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 166574e5..6148b029 100644 --- a/pom.xml +++ b/pom.xml @@ -29,12 +29,12 @@ deployment Internal Releases - http://172.31.13.251:8081/repository/maven-releases/ + http://10.128.0.10:8081/repository/maven-releases/ deployment Internal Snapshot Releases - http://172.31.13.251:8081/repository/maven-snapshots/ + http://10.128.0.10:8081/repository/maven-snapshots/ From 3fa2243cc10c0aef5276708e1a4a7bec9c26b17e Mon Sep 17 00:00:00 2001 From: carreerit Date: Fri, 27 Oct 2017 06:53:19 +0530 Subject: [PATCH 11/28] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6148b029..1299fbcc 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.jdevs studentapp - 2.2-SNAPSHOT + 2.3-SNAPSHOT war src From d74564284409d4f2bff89296dce73d2ed62e1972 Mon Sep 17 00:00:00 2001 From: carreerit Date: Fri, 27 Oct 2017 07:00:07 +0530 Subject: [PATCH 12/28] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1299fbcc..ae8ad71a 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.jdevs studentapp - 2.3-SNAPSHOT + 2.4-SNAPSHOT war src From f93fb00927535043cb3a6c88a1b4f57f157d3c13 Mon Sep 17 00:00:00 2001 From: carreerit Date: Sat, 28 Oct 2017 06:19:12 +0530 Subject: [PATCH 13/28] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ae8ad71a..f30630d0 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.jdevs studentapp - 2.4-SNAPSHOT + 2.5-SNAPSHOT war src From 87ce68b4503e8ca022875bf034f8ba8dca84c37a Mon Sep 17 00:00:00 2001 From: carreerit Date: Mon, 30 Oct 2017 21:07:10 +0530 Subject: [PATCH 14/28] Update pom.xml --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f30630d0..382c84e4 100644 --- a/pom.xml +++ b/pom.xml @@ -29,12 +29,12 @@ deployment Internal Releases - http://10.128.0.10:8081/repository/maven-releases/ + http://35.197.183.217:8081/repository/SAMPLE-REL/ deployment Internal Snapshot Releases - http://10.128.0.10:8081/repository/maven-snapshots/ + http://35.197.183.217:8081/repository/SAMPLE-SNAP/ From 65245569017ab1e1ce4c6561147e3a89a5f6b3f5 Mon Sep 17 00:00:00 2001 From: carreerit Date: Thu, 2 Nov 2017 06:51:38 +0530 Subject: [PATCH 15/28] Update pom.xml --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 382c84e4..907a6ccc 100644 --- a/pom.xml +++ b/pom.xml @@ -29,12 +29,12 @@ deployment Internal Releases - http://35.197.183.217:8081/repository/SAMPLE-REL/ + http://10.128.0.10:8081/repository/SAMPLE-REL/ deployment Internal Snapshot Releases - http://35.197.183.217:8081/repository/SAMPLE-SNAP/ + http://10.128.0.10:8081/repository/SAMPLE-SNAP/ From 46d40fe6633133bb54912937c6403f1431da0ed6 Mon Sep 17 00:00:00 2001 From: carreerit Date: Fri, 3 Nov 2017 06:14:37 +0530 Subject: [PATCH 16/28] Update pom.xml --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 907a6ccc..f9b4b08d 100644 --- a/pom.xml +++ b/pom.xml @@ -29,12 +29,12 @@ deployment Internal Releases - http://10.128.0.10:8081/repository/SAMPLE-REL/ + http://10.128.0.10:8081/repository/student-rel/ deployment Internal Snapshot Releases - http://10.128.0.10:8081/repository/SAMPLE-SNAP/ + http://10.128.0.10:8081/repository/student-snap/ From f12e26226b4d912a612a7ea601458108db9586dc Mon Sep 17 00:00:00 2001 From: carreerit Date: Fri, 3 Nov 2017 06:36:47 +0530 Subject: [PATCH 17/28] Create deploy-for-test.sh --- deploy-for-test.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 deploy-for-test.sh diff --git a/deploy-for-test.sh b/deploy-for-test.sh new file mode 100644 index 00000000..9a9b324e --- /dev/null +++ b/deploy-for-test.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +### Remove old war files +rm -rf /tomcat/test/webapps/student* + +### Copy the war file +cp /var/lib/jenkins/workspace/sample-test1/target/student*.war /tomcat/test/webapps/student.war + +sleep 20 + +RESPONSE=$(curl -s -I http://localhost:8082/student | head -1 | awk '{print $2}') +echo RESPONSE = $RESPONSE +if [ "$RESPONSE" != 200 ]; then + echo "Respinse from student APP is not OK" + exit 1 +fi + + From ef3a5ada1c431988e709696ffc13ea09bf4b0757 Mon Sep 17 00:00:00 2001 From: carreerit Date: Fri, 3 Nov 2017 06:41:53 +0530 Subject: [PATCH 18/28] Update deploy-for-test.sh --- deploy-for-test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy-for-test.sh b/deploy-for-test.sh index 9a9b324e..17f2ec07 100644 --- a/deploy-for-test.sh +++ b/deploy-for-test.sh @@ -8,10 +8,10 @@ cp /var/lib/jenkins/workspace/sample-test1/target/student*.war /tomcat/test/weba sleep 20 -RESPONSE=$(curl -s -I http://localhost:8082/student | head -1 | awk '{print $2}') +RESPONSE=$(curl -s -I http://localhost:8082/student/index.jsp | head -1 | awk '{print $2}') echo RESPONSE = $RESPONSE if [ "$RESPONSE" != 200 ]; then - echo "Respinse from student APP is not OK" + echo "Response from student APP is not OK" exit 1 fi From 96f2cf4111118c79674ea26de27c078f51feb45d Mon Sep 17 00:00:00 2001 From: carreerit Date: Fri, 3 Nov 2017 06:52:16 +0530 Subject: [PATCH 19/28] Create deploy.yml --- deploy.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 deploy.yml diff --git a/deploy.yml b/deploy.yml new file mode 100644 index 00000000..617279c7 --- /dev/null +++ b/deploy.yml @@ -0,0 +1,11 @@ +- name: Deploy student app in PROD + hosts: all + become: yes + tasks: + - name: Remove the old war files + file: + name: "/opt/apache-tomcat-9.0.1/webapps/{{item}}" + state: absent + with_items: + - student + - student.war From 9c3d2a6c7c600b4099dc73afacd24e196a213898 Mon Sep 17 00:00:00 2001 From: carreerit Date: Fri, 3 Nov 2017 06:54:25 +0530 Subject: [PATCH 20/28] Create inventory --- inventory | 1 + 1 file changed, 1 insertion(+) create mode 100644 inventory diff --git a/inventory b/inventory new file mode 100644 index 00000000..877be31d --- /dev/null +++ b/inventory @@ -0,0 +1 @@ +10.128.0.3 From 91d6788670a63adec23f2da26c74136ec8c3c817 Mon Sep 17 00:00:00 2001 From: carreerit Date: Sat, 4 Nov 2017 06:26:37 +0530 Subject: [PATCH 21/28] Update deploy-for-test.sh --- deploy-for-test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy-for-test.sh b/deploy-for-test.sh index 17f2ec07..ee8a1b6c 100644 --- a/deploy-for-test.sh +++ b/deploy-for-test.sh @@ -15,4 +15,5 @@ if [ "$RESPONSE" != 200 ]; then exit 1 fi - +URL=$(cat /var/lib/jenkins/jobs/sample-test1/builds/$BUILD_NUMBER/log | grep Uploaded | grep war |xargs -n1 | grep ^http) +sed -i -e "s/URL-LOC/$URL/" deploy.yml From fb3b9766a7beee821c84dae2bf2c743d998cdd88 Mon Sep 17 00:00:00 2001 From: carreerit Date: Sat, 4 Nov 2017 06:27:10 +0530 Subject: [PATCH 22/28] Update deploy.yml --- deploy.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/deploy.yml b/deploy.yml index 617279c7..1f0f6c25 100644 --- a/deploy.yml +++ b/deploy.yml @@ -1,6 +1,8 @@ - name: Deploy student app in PROD hosts: all become: yes + vars: + URL: URL-LOC tasks: - name: Remove the old war files file: @@ -9,3 +11,7 @@ with_items: - student - student.war + - name: Download Warfile + get_url: + url: "{{URL}}" + dest: /opt/apache-tomcat-9.0.1/webapps/student.war From a4a4ad8085f48ce010cda00e63dfdd55d0bf83ce Mon Sep 17 00:00:00 2001 From: carreerit Date: Sat, 4 Nov 2017 06:32:03 +0530 Subject: [PATCH 23/28] Update deploy.yml --- deploy.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy.yml b/deploy.yml index 1f0f6c25..af91b7b8 100644 --- a/deploy.yml +++ b/deploy.yml @@ -11,7 +11,7 @@ with_items: - student - student.war - - name: Download Warfile - get_url: - url: "{{URL}}" - dest: /opt/apache-tomcat-9.0.1/webapps/student.war + - name: Download war file + get_url: + url: "{{URL}}" + dest: /opt/apache-tomcat-9.0.1/webapps/student.war From c7dd516aaefbe6895d01e905654270b4ab51e95a Mon Sep 17 00:00:00 2001 From: carreerit Date: Sat, 4 Nov 2017 06:34:24 +0530 Subject: [PATCH 24/28] Update deploy-for-test.sh --- deploy-for-test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy-for-test.sh b/deploy-for-test.sh index ee8a1b6c..6002e6cd 100644 --- a/deploy-for-test.sh +++ b/deploy-for-test.sh @@ -10,10 +10,10 @@ sleep 20 RESPONSE=$(curl -s -I http://localhost:8082/student/index.jsp | head -1 | awk '{print $2}') echo RESPONSE = $RESPONSE -if [ "$RESPONSE" != 200 ]; then +if [ "$RESPONSE" != 200 ]; then echo "Response from student APP is not OK" exit 1 fi - + URL=$(cat /var/lib/jenkins/jobs/sample-test1/builds/$BUILD_NUMBER/log | grep Uploaded | grep war |xargs -n1 | grep ^http) -sed -i -e "s/URL-LOC/$URL/" deploy.yml +sed -i -e "s|URL-LOC|$URL|" deploy.yml From ebff9056f126e40b3ffc16c1f0d3af694ff2d473 Mon Sep 17 00:00:00 2001 From: carreerit Date: Sat, 4 Nov 2017 06:41:24 +0530 Subject: [PATCH 25/28] Update index.jsp --- WebContent/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebContent/index.jsp b/WebContent/index.jsp index a2c04846..5d19d508 100644 --- a/WebContent/index.jsp +++ b/WebContent/index.jsp @@ -20,7 +20,7 @@ div.ex {
Student Full NameStudent First Name , Last Name
- + From 7120cf37ad3296cdc7e71bea5eae546841d15065 Mon Sep 17 00:00:00 2001 From: carreerit Date: Mon, 18 Dec 2017 09:29:15 +0530 Subject: [PATCH 26/28] Update inventory --- inventory | 1 + 1 file changed, 1 insertion(+) diff --git a/inventory b/inventory index 877be31d..619ecb45 100644 --- a/inventory +++ b/inventory @@ -1 +1,2 @@ 10.128.0.3 +#### From 658f6e42b7437e1a82c456053569038c07de23ae Mon Sep 17 00:00:00 2001 From: r-devops Date: Mon, 6 May 2019 18:12:20 +0530 Subject: [PATCH 27/28] Update StudentDAO.java --- src/com/srk/dao/StudentDAO.java | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/com/srk/dao/StudentDAO.java b/src/com/srk/dao/StudentDAO.java index eb1db370..3b4b2226 100644 --- a/src/com/srk/dao/StudentDAO.java +++ b/src/com/srk/dao/StudentDAO.java @@ -21,6 +21,35 @@ public class StudentDAO { return con; }*/ + + /*public static Connection getConnection(){ + Connection con=null; + try{ + Class.forName("com.mysql.jdbc.Driver"); + con=DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","root"); + }catch(Exception e){System.out.println(e);} + return con; + }*/ + + + /*public static Connection getConnection(){ + Connection con=null; + try{ + Class.forName("com.mysql.jdbc.Driver"); + con=DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","root"); + }catch(Exception e){System.out.println(e);} + return con; + }*/ + + + /*public static Connection getConnection(){ + Connection con=null; + try{ + Class.forName("com.mysql.jdbc.Driver"); + con=DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","root"); + }catch(Exception e){System.out.println(e);} + return con; + }*/ public static Connection getConnection() throws Exception { Connection conn=null; Context initContext = new InitialContext(); @@ -130,4 +159,4 @@ public static List getAllStudents(){ return students; } -} \ No newline at end of file +} From 2984ab7cf277aad9b98f5ceb7c3766f17b7546b7 Mon Sep 17 00:00:00 2001 From: veenahub <61018686+veenahub@users.noreply.github.com> Date: Thu, 28 Jan 2021 15:44:09 +0100 Subject: [PATCH 28/28] Create Dockerfile --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..c643a9a3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM openjdk:8 +Expose 8080 +ADD target/studentapp-2.5-SNAPSHOT.jar studentapp-2.5-SNAPSHOT.jar +ENTRYPOINT ["java","-jar","/studentapp-2.5-SNAPSHOT.jar"]
Student First Name , Last NameStudent Full Name