From 11035921cfe877c8903dea15fa804bffbdbddd1e Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Tue, 17 Sep 2024 17:55:46 +0530 Subject: [PATCH 01/26] Create tomcat --- tomcat | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tomcat diff --git a/tomcat b/tomcat new file mode 100644 index 00000000..9ee8d587 --- /dev/null +++ b/tomcat @@ -0,0 +1,2 @@ +FROM tomcat:8.0 +copy /home/ec2-user/LoginWebApp.war /usr/local/tomcat/webapps/LoginWebApp.war From 295d8308ec426964f65dc6c14ad27690865b2352 Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Tue, 17 Sep 2024 18:08:44 +0530 Subject: [PATCH 02/26] Update tomcat --- tomcat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tomcat b/tomcat index 9ee8d587..2b6d6819 100644 --- a/tomcat +++ b/tomcat @@ -1,2 +1,2 @@ FROM tomcat:8.0 -copy /home/ec2-user/LoginWebApp.war /usr/local/tomcat/webapps/LoginWebApp.war +COPY LoginWebApp.war /usr/local/tomcat/webapps/ From 24e69616073091686ebb291a07d11030d034589e Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Wed, 18 Sep 2024 15:41:05 +0530 Subject: [PATCH 03/26] Update login.jsp --- src/main/webapp/login.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/login.jsp b/src/main/webapp/login.jsp index 7f9f0fb9..983373ba 100644 --- a/src/main/webapp/login.jsp +++ b/src/main/webapp/login.jsp @@ -3,7 +3,7 @@ String userName = request.getParameter("userName"); String password = request.getParameter("password"); Class.forName("com.mysql.jdbc.Driver"); - Connection con = DriverManager.getConnection("jdbc:mysql://db:3306/devopsclass", "ranjit", "Sunday@2019"); + Connection con = DriverManager.getConnection("jdbc:mysql://65.2.79.7:3306/devopsclass", "ranjit", "Sunday@2019"); Statement st = con.createStatement(); ResultSet rs; rs = st.executeQuery("select * from USER where username='" + userName + "' and password='" +password + "'"); From c6f04012e743680f3fc781a272d0cbbc4cb040a5 Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Wed, 18 Sep 2024 15:41:29 +0530 Subject: [PATCH 04/26] Update userRegistration.jsp --- src/main/webapp/userRegistration.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/userRegistration.jsp b/src/main/webapp/userRegistration.jsp index aa4acd88..615bce6d 100644 --- a/src/main/webapp/userRegistration.jsp +++ b/src/main/webapp/userRegistration.jsp @@ -6,7 +6,7 @@ String lastName = request.getParameter("lastName"); String email = request.getParameter("email"); Class.forName("com.mysql.jdbc.Driver"); - Connection con = DriverManager.getConnection("jdbc:mysql://db:3306/devopsclass", "ranjit", "Sunday@2019"); + Connection con = DriverManager.getConnection("jdbc:mysql://65.2.79.7:3306/devopsclass", "ranjit", "Sunday@2019"); Statement st = con.createStatement(); int i = st.executeUpdate("insert into USER(first_name, last_name, email, username, password, regdate) values ('" + firstName + "','" + lastName + "','" + email + "','" + userName + "','" + password + "', CURDATE())"); if (i > 0) { From 3c6cefc4387a4ea37603a11bcf1c23f9e6d42c3a Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Wed, 18 Sep 2024 16:35:52 +0530 Subject: [PATCH 05/26] Update userRegistration.jsp --- src/main/webapp/userRegistration.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/userRegistration.jsp b/src/main/webapp/userRegistration.jsp index 615bce6d..aa4acd88 100644 --- a/src/main/webapp/userRegistration.jsp +++ b/src/main/webapp/userRegistration.jsp @@ -6,7 +6,7 @@ String lastName = request.getParameter("lastName"); String email = request.getParameter("email"); Class.forName("com.mysql.jdbc.Driver"); - Connection con = DriverManager.getConnection("jdbc:mysql://65.2.79.7:3306/devopsclass", "ranjit", "Sunday@2019"); + Connection con = DriverManager.getConnection("jdbc:mysql://db:3306/devopsclass", "ranjit", "Sunday@2019"); Statement st = con.createStatement(); int i = st.executeUpdate("insert into USER(first_name, last_name, email, username, password, regdate) values ('" + firstName + "','" + lastName + "','" + email + "','" + userName + "','" + password + "', CURDATE())"); if (i > 0) { From 9a85a0ad3be88594e5184610afd5ba9ab3928354 Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Wed, 18 Sep 2024 16:36:05 +0530 Subject: [PATCH 06/26] Update login.jsp --- src/main/webapp/login.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/login.jsp b/src/main/webapp/login.jsp index 983373ba..7f9f0fb9 100644 --- a/src/main/webapp/login.jsp +++ b/src/main/webapp/login.jsp @@ -3,7 +3,7 @@ String userName = request.getParameter("userName"); String password = request.getParameter("password"); Class.forName("com.mysql.jdbc.Driver"); - Connection con = DriverManager.getConnection("jdbc:mysql://65.2.79.7:3306/devopsclass", "ranjit", "Sunday@2019"); + Connection con = DriverManager.getConnection("jdbc:mysql://db:3306/devopsclass", "ranjit", "Sunday@2019"); Statement st = con.createStatement(); ResultSet rs; rs = st.executeQuery("select * from USER where username='" + userName + "' and password='" +password + "'"); From 5356490c2d58228d56df5b75753e3ac756023e32 Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:25:19 +0530 Subject: [PATCH 07/26] Update login.jsp --- src/main/webapp/login.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/login.jsp b/src/main/webapp/login.jsp index 7f9f0fb9..34355b44 100644 --- a/src/main/webapp/login.jsp +++ b/src/main/webapp/login.jsp @@ -2,7 +2,7 @@ <% String userName = request.getParameter("userName"); String password = request.getParameter("password"); - Class.forName("com.mysql.jdbc.Driver"); + Class.forName("com.mysql.cj.jdbc.Driver"); Connection con = DriverManager.getConnection("jdbc:mysql://db:3306/devopsclass", "ranjit", "Sunday@2019"); Statement st = con.createStatement(); ResultSet rs; From 190369d1af5301f5c05495b886f2bb03b8c05b7b Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:33:19 +0530 Subject: [PATCH 08/26] Update login.jsp --- src/main/webapp/login.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/login.jsp b/src/main/webapp/login.jsp index 34355b44..7f9f0fb9 100644 --- a/src/main/webapp/login.jsp +++ b/src/main/webapp/login.jsp @@ -2,7 +2,7 @@ <% String userName = request.getParameter("userName"); String password = request.getParameter("password"); - Class.forName("com.mysql.cj.jdbc.Driver"); + Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection("jdbc:mysql://db:3306/devopsclass", "ranjit", "Sunday@2019"); Statement st = con.createStatement(); ResultSet rs; From 9d7fb64941f6aa04602840410c4ddb8a8f15364a Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:41:57 +0530 Subject: [PATCH 09/26] Update login.jsp From 550e8b496ddb9003d6a89184591c1ffdf92fd825 Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:43:23 +0530 Subject: [PATCH 10/26] Update userRegistration.jsp 1 From 058b392c41a0e115a0efc70f48797347e2493fa3 Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:44:33 +0530 Subject: [PATCH 11/26] Update userRegistration.jsp 1 From 12c55e0c987787e5b2aa9119e961eba8e608d11f Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:51:50 +0530 Subject: [PATCH 12/26] Update pom.xml line 19 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 86876305..f06e883a 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ mysql mysql-connector-java - 8.0.12 + 8.0.22 junit From c7b1ed48d30da61fe11c71656cfd3126927986a1 Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:54:09 +0530 Subject: [PATCH 13/26] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f06e883a..86876305 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ mysql mysql-connector-java - 8.0.22 + 8.0.12 junit From c557c98fcc7a2f378c1e7b72e70276f17497e4f9 Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Wed, 18 Sep 2024 20:07:40 +0530 Subject: [PATCH 14/26] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 86876305..d4aee737 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ mysql mysql-connector-java - 8.0.12 + 5.1.46 junit From 10b7bc7739aa52c40a7b2c09c3ac94ba4479713c Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Thu, 19 Sep 2024 15:43:55 +0530 Subject: [PATCH 15/26] Update try/catch block, --- src/main/webapp/login.jsp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/login.jsp b/src/main/webapp/login.jsp index 7f9f0fb9..8f928f0d 100644 --- a/src/main/webapp/login.jsp +++ b/src/main/webapp/login.jsp @@ -2,9 +2,14 @@ <% String userName = request.getParameter("userName"); String password = request.getParameter("password"); - Class.forName("com.mysql.jdbc.Driver"); - Connection con = DriverManager.getConnection("jdbc:mysql://db:3306/devopsclass", "ranjit", "Sunday@2019"); - Statement st = con.createStatement(); + try { + Class.forName("com.mysql.jdbc.Driver"); + Connection con = DriverManager.getConnection("jdbc:mysql://db:3306/devopsclass", "ranjit", "Sunday@2019"); + Statement st = con.createStatement(); + } catch (SQLException e) { + // Handle the exception + System.out.println("Error connecting to database: " + e.getMessage()); + } ResultSet rs; rs = st.executeQuery("select * from USER where username='" + userName + "' and password='" +password + "'"); if (rs.next()) { From 853387d9e8d0378765f8d5b1c7cb69329d817b43 Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Thu, 19 Sep 2024 15:44:52 +0530 Subject: [PATCH 16/26] Update try/catch block --- src/main/webapp/userRegistration.jsp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/webapp/userRegistration.jsp b/src/main/webapp/userRegistration.jsp index aa4acd88..a2106cc4 100644 --- a/src/main/webapp/userRegistration.jsp +++ b/src/main/webapp/userRegistration.jsp @@ -5,9 +5,14 @@ String firstName = request.getParameter("firstName"); String lastName = request.getParameter("lastName"); String email = request.getParameter("email"); + try { Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection("jdbc:mysql://db:3306/devopsclass", "ranjit", "Sunday@2019"); Statement st = con.createStatement(); + } catch (SQLException e) { + // Handle the exception + System.out.println("Error connecting to database: " + e.getMessage()); + } int i = st.executeUpdate("insert into USER(first_name, last_name, email, username, password, regdate) values ('" + firstName + "','" + lastName + "','" + email + "','" + userName + "','" + password + "', CURDATE())"); if (i > 0) { response.sendRedirect("welcome.jsp"); From dd8952d41bae95933d7e4f29892ea34531893b11 Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Thu, 19 Sep 2024 16:07:50 +0530 Subject: [PATCH 17/26] Update login.jsp --- src/main/webapp/login.jsp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/main/webapp/login.jsp b/src/main/webapp/login.jsp index 8f928f0d..7f9f0fb9 100644 --- a/src/main/webapp/login.jsp +++ b/src/main/webapp/login.jsp @@ -2,14 +2,9 @@ <% String userName = request.getParameter("userName"); String password = request.getParameter("password"); - try { - Class.forName("com.mysql.jdbc.Driver"); - Connection con = DriverManager.getConnection("jdbc:mysql://db:3306/devopsclass", "ranjit", "Sunday@2019"); - Statement st = con.createStatement(); - } catch (SQLException e) { - // Handle the exception - System.out.println("Error connecting to database: " + e.getMessage()); - } + Class.forName("com.mysql.jdbc.Driver"); + Connection con = DriverManager.getConnection("jdbc:mysql://db:3306/devopsclass", "ranjit", "Sunday@2019"); + Statement st = con.createStatement(); ResultSet rs; rs = st.executeQuery("select * from USER where username='" + userName + "' and password='" +password + "'"); if (rs.next()) { From 6f057feb5ff326aec6f97265d66293b6213470c4 Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Thu, 19 Sep 2024 16:08:28 +0530 Subject: [PATCH 18/26] Update userRegistration.jsp --- src/main/webapp/userRegistration.jsp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/main/webapp/userRegistration.jsp b/src/main/webapp/userRegistration.jsp index a2106cc4..aa4acd88 100644 --- a/src/main/webapp/userRegistration.jsp +++ b/src/main/webapp/userRegistration.jsp @@ -5,14 +5,9 @@ String firstName = request.getParameter("firstName"); String lastName = request.getParameter("lastName"); String email = request.getParameter("email"); - try { Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection("jdbc:mysql://db:3306/devopsclass", "ranjit", "Sunday@2019"); Statement st = con.createStatement(); - } catch (SQLException e) { - // Handle the exception - System.out.println("Error connecting to database: " + e.getMessage()); - } int i = st.executeUpdate("insert into USER(first_name, last_name, email, username, password, regdate) values ('" + firstName + "','" + lastName + "','" + email + "','" + userName + "','" + password + "', CURDATE())"); if (i > 0) { response.sendRedirect("welcome.jsp"); From 434575f9b61f4555c5f1615de97f5f2b0997a3e0 Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Fri, 20 Sep 2024 11:50:07 +0530 Subject: [PATCH 19/26] Update login.jsp --- src/main/webapp/login.jsp | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/src/main/webapp/login.jsp b/src/main/webapp/login.jsp index 7f9f0fb9..918e4a55 100644 --- a/src/main/webapp/login.jsp +++ b/src/main/webapp/login.jsp @@ -1,16 +1,31 @@ -<%@ page import="java.sql.*"%> +<%@ page import="java.sql.*" %> <% String userName = request.getParameter("userName"); String password = request.getParameter("password"); - Class.forName("com.mysql.jdbc.Driver"); - Connection con = DriverManager.getConnection("jdbc:mysql://db:3306/devopsclass", "ranjit", "Sunday@2019"); - Statement st = con.createStatement(); - ResultSet rs; - rs = st.executeQuery("select * from USER where username='" + userName + "' and password='" +password + "'"); - if (rs.next()) { - session.setAttribute("userid", userName); - response.sendRedirect("success.jsp"); - } else { - out.println("Invalid password try again"); + try { + Class.forName("com.mysql.cj.jdbc.Driver"); + Connection con = DriverManager.getConnection("jdbc:mysql://db:3306/devopsclass", "ranjit", "Sunday@2019"); + + String sql = "SELECT * FROM USER WHERE username = ? AND password = ?"; + PreparedStatement pst = con.prepareStatement(sql); + pst.setString(1, userName); + pst.setString(2, password); + + ResultSet rs = pst.executeQuery(); + + if (rs.next()) { + session.setAttribute("userid", userName); + response.sendRedirect("success.jsp"); + } else { + out.println("Invalid password try again"); + } + + rs.close(); + pst.close(); + con.close(); + } catch (ClassNotFoundException e) { + out.println("JDBC Driver not found: " + e.getMessage()); + } catch (SQLException e) { + out.println("Database connection error: " + e.getMessage()); } %> From 26dae7731b67ba700a8643e0675e8971d12e31d1 Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Fri, 20 Sep 2024 12:08:04 +0530 Subject: [PATCH 20/26] Update line 6 --- src/main/webapp/login.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/login.jsp b/src/main/webapp/login.jsp index 918e4a55..45c142ae 100644 --- a/src/main/webapp/login.jsp +++ b/src/main/webapp/login.jsp @@ -3,7 +3,7 @@ String userName = request.getParameter("userName"); String password = request.getParameter("password"); try { - Class.forName("com.mysql.cj.jdbc.Driver"); + Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection("jdbc:mysql://db:3306/devopsclass", "ranjit", "Sunday@2019"); String sql = "SELECT * FROM USER WHERE username = ? AND password = ?"; From 240ef615e99829760e7cfea6e0ab7f27e546b106 Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Fri, 20 Sep 2024 12:38:57 +0530 Subject: [PATCH 21/26] Update login.jsp --- src/main/webapp/login.jsp | 37 +++++++++++-------------------------- 1 file changed, 11 insertions(+), 26 deletions(-) diff --git a/src/main/webapp/login.jsp b/src/main/webapp/login.jsp index 45c142ae..7f9f0fb9 100644 --- a/src/main/webapp/login.jsp +++ b/src/main/webapp/login.jsp @@ -1,31 +1,16 @@ -<%@ page import="java.sql.*" %> +<%@ page import="java.sql.*"%> <% String userName = request.getParameter("userName"); String password = request.getParameter("password"); - try { - Class.forName("com.mysql.jdbc.Driver"); - Connection con = DriverManager.getConnection("jdbc:mysql://db:3306/devopsclass", "ranjit", "Sunday@2019"); - - String sql = "SELECT * FROM USER WHERE username = ? AND password = ?"; - PreparedStatement pst = con.prepareStatement(sql); - pst.setString(1, userName); - pst.setString(2, password); - - ResultSet rs = pst.executeQuery(); - - if (rs.next()) { - session.setAttribute("userid", userName); - response.sendRedirect("success.jsp"); - } else { - out.println("Invalid password try again"); - } - - rs.close(); - pst.close(); - con.close(); - } catch (ClassNotFoundException e) { - out.println("JDBC Driver not found: " + e.getMessage()); - } catch (SQLException e) { - out.println("Database connection error: " + e.getMessage()); + Class.forName("com.mysql.jdbc.Driver"); + Connection con = DriverManager.getConnection("jdbc:mysql://db:3306/devopsclass", "ranjit", "Sunday@2019"); + Statement st = con.createStatement(); + ResultSet rs; + rs = st.executeQuery("select * from USER where username='" + userName + "' and password='" +password + "'"); + if (rs.next()) { + session.setAttribute("userid", userName); + response.sendRedirect("success.jsp"); + } else { + out.println("Invalid password try again"); } %> From ec5ba4d9a0e0831c989b19b29721fb639640db53 Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Mon, 23 Sep 2024 12:40:28 +0530 Subject: [PATCH 22/26] Create docker_compose.yml --- docker_compose.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docker_compose.yml diff --git a/docker_compose.yml b/docker_compose.yml new file mode 100644 index 00000000..617f0f68 --- /dev/null +++ b/docker_compose.yml @@ -0,0 +1,15 @@ +--- +version: '3' +services: + db: + build: + dockerfile: mysql + ports: + - 3306:3306 + tomcat: + build: + dockerfile: tomcat + ports: + - 8080:8080 + links: + - db From 50ca758b052eb2d891f51b1ac4fc04b854a23bce Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Mon, 23 Sep 2024 12:41:02 +0530 Subject: [PATCH 23/26] Create mysql --- mysql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 mysql diff --git a/mysql b/mysql new file mode 100644 index 00000000..19990ed2 --- /dev/null +++ b/mysql @@ -0,0 +1,8 @@ +FROM mysql:5.7.28 + +ENV MYSQL_ROOT_PASSWORD=root +ENV MYSQL_DATABASE=devopsclass +ENV MYSQL_USER=ranjit +ENV MYSQL_PASSWORD=Sunday@2019 + +COPY devopsclass.sql /docker-entrypoint-initdb.d From 43e897c8d60329b282aadeee3c700c01625e102b Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Mon, 23 Sep 2024 12:41:59 +0530 Subject: [PATCH 24/26] Delete Dockerfile-tomcat --- Dockerfile-tomcat | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 Dockerfile-tomcat diff --git a/Dockerfile-tomcat b/Dockerfile-tomcat deleted file mode 100644 index 0cc4017a..00000000 --- a/Dockerfile-tomcat +++ /dev/null @@ -1,9 +0,0 @@ -#Base image -FROM tomcat:8.5 - -#COPY -COPY ./target/LoginWebApp.war /usr/local/tomcat/webapps/ - -WORKDIR /usr/local/tomcat/webapps/ - -CMD ["catalina.sh", "run"] From 9a8d6a884983f45ff5b7854166411e44464a1509 Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Mon, 23 Sep 2024 12:42:13 +0530 Subject: [PATCH 25/26] Delete Dockerfile-mysql --- Dockerfile-mysql | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 Dockerfile-mysql diff --git a/Dockerfile-mysql b/Dockerfile-mysql deleted file mode 100644 index fa3aefdc..00000000 --- a/Dockerfile-mysql +++ /dev/null @@ -1,5 +0,0 @@ -#Base image -FROM mysql:5.7.28 - -#COPY -COPY ./dump/devopsclass.sql /docker-entrypoint-initdb.d From c6037f836759e4787dc035c50e0de174f855677a Mon Sep 17 00:00:00 2001 From: Asit kumar sahoo <110346210+Kasit26@users.noreply.github.com> Date: Mon, 23 Sep 2024 12:42:27 +0530 Subject: [PATCH 26/26] Delete Jenkinsfile --- Jenkinsfile | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index f1f2e9e3..00000000 --- a/Jenkinsfile +++ /dev/null @@ -1,33 +0,0 @@ -pipeline { - agent any - tools { - maven 'localMaven' - } - - parameters { - string(name: 'tomcat_stag', defaultValue: '35.154.81.229', description: 'Tomcat Staging Server') - } - -stages{ - stage('Build'){ - steps { - sh 'mvn clean package' - } - post { - success { - echo 'Archiving the artifacts' - archiveArtifacts artifacts: '**/*.war' - } - } - } - - stage ('Deployments'){ - stage ('Deploy to Staging Server'){ - steps { - sh "scp **/*.war jenkins@${params.tomcat_stag}:/usr/share/tomcat/webapps" - } - } - } - } - } -}