From 3c3b2c01489699fd4964fb087d5023838d63e2a2 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sun, 24 Jan 2021 21:51:03 +0530 Subject: [PATCH 01/52] Update index.html --- src/main/webapp/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 17ed961..41ebbe4 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,7 +1,7 @@ -

Welcome Page


+

Ansible project completed


Login
Register
- \ No newline at end of file + From c47451e6ec4e156f320b6ceed9bdc3905e038531 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 6 Feb 2021 05:37:08 +0000 Subject: [PATCH 02/52] new db details --- src/main/java/com/example/DbUtil.java | 4 ++-- src/main/java/com/example/application.properties | 4 ++-- src/main/webapp/WEB-INF/web.xml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/example/DbUtil.java b/src/main/java/com/example/DbUtil.java index 4fda626..ad7dffc 100644 --- a/src/main/java/com/example/DbUtil.java +++ b/src/main/java/com/example/DbUtil.java @@ -9,9 +9,9 @@ public class DbUtil { static Connection con=null; static String driver = "com.mysql.cj.jdbc.Driver"; - static String url = "jdbc:mysql://flipkart.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/flipkart"; + static String url = "jdbc:mysql://trainingwale.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/flipkart"; static String username = "admin"; - static String password = "test123test"; + static String password = "welcome1"; static { try { diff --git a/src/main/java/com/example/application.properties b/src/main/java/com/example/application.properties index fd3101a..d08eabb 100644 --- a/src/main/java/com/example/application.properties +++ b/src/main/java/com/example/application.properties @@ -1,4 +1,4 @@ database.driver=com.mysql.cj.jdbc.Driver -database.url=jdbc:mysql://flipkart.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/flipkart +database.url=jdbc:mysql://trainingwale.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/flipkart database.username=admin -database.password=test123test +database.password=welcome1 diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 249c9f6..4ce500a 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -10,11 +10,11 @@ dbPassword - welcome123 + welcome1 dbURL - jdbc:mysql://flipkart.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/ + jdbc:mysql://trainingwale.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/ dbName From b76841a915f76aeb198c45627f56e9039b046681 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sat, 6 Feb 2021 11:22:24 +0530 Subject: [PATCH 03/52] Update README.md --- README.md | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ba52519..ca93d0e 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,30 @@ install MySQL version 8.0.21 (ie. 8.0.x) -database username: root -database password: admin +database username: admin +database password: welcome1 If you are using another user then needs to be changed in java file: DbUtil.java -mysql> create database tempdb; +mysql> create database flipkart; -mysql> use tempdb; +mysql> use flipkart; mysql> create table user(name varchar(100),password varchar(100), address varchar(1000), age int, profession varchar(100)); mysql> select * from User; + +Go to server + +1. yum install git -y +2. cd $HOME +3. git clone https://github.com/mailrahulsre/java-db-Login.git +4. cd /root/java-db-Login/src/main +5. Update files - with DB end POINT + - java/com/example/DbUtil.java + - java/com/example/application.properties + - webapp/WEB-INF/web.xml + + 6. git add . + 7. git commit . -m "new db details" + 8. git push origin master From 8cda035a0cd34153b071b2bf650dbce471c6e98f Mon Sep 17 00:00:00 2001 From: root Date: Tue, 23 Feb 2021 03:56:52 +0000 Subject: [PATCH 04/52] new --- src/main/java/com/example/DbUtil.java | 2 +- src/main/java/com/example/application.properties | 2 +- src/main/webapp/WEB-INF/web.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/example/DbUtil.java b/src/main/java/com/example/DbUtil.java index ad7dffc..0740c72 100644 --- a/src/main/java/com/example/DbUtil.java +++ b/src/main/java/com/example/DbUtil.java @@ -9,7 +9,7 @@ public class DbUtil { static Connection con=null; static String driver = "com.mysql.cj.jdbc.Driver"; - static String url = "jdbc:mysql://trainingwale.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/flipkart"; + static String url = "jdbc:mysql://flipkart.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/flipkart"; static String username = "admin"; static String password = "welcome1"; diff --git a/src/main/java/com/example/application.properties b/src/main/java/com/example/application.properties index d08eabb..6a18e24 100644 --- a/src/main/java/com/example/application.properties +++ b/src/main/java/com/example/application.properties @@ -1,4 +1,4 @@ database.driver=com.mysql.cj.jdbc.Driver -database.url=jdbc:mysql://trainingwale.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/flipkart +database.url=jdbc:mysql://flipkart.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/flipkart database.username=admin database.password=welcome1 diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 4ce500a..6ff0bae 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -14,7 +14,7 @@ dbURL - jdbc:mysql://trainingwale.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/ + jdbc:mysql://flipkart.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/ dbName From f08ab08717a2fb6447beddbb50b9ceca3c1a2071 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 27 Feb 2021 14:43:09 +0000 Subject: [PATCH 05/52] new db updated --- src/main/java/com/example/DbUtil.java | 2 +- src/main/java/com/example/application.properties | 2 +- src/main/webapp/WEB-INF/web.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/example/DbUtil.java b/src/main/java/com/example/DbUtil.java index 0740c72..8adb834 100644 --- a/src/main/java/com/example/DbUtil.java +++ b/src/main/java/com/example/DbUtil.java @@ -9,7 +9,7 @@ public class DbUtil { static Connection con=null; static String driver = "com.mysql.cj.jdbc.Driver"; - static String url = "jdbc:mysql://flipkart.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/flipkart"; + static String url = "jdbc:mysql://learnwithprojects-com.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/learnwithprojectsCom"; static String username = "admin"; static String password = "welcome1"; diff --git a/src/main/java/com/example/application.properties b/src/main/java/com/example/application.properties index 6a18e24..abbdb19 100644 --- a/src/main/java/com/example/application.properties +++ b/src/main/java/com/example/application.properties @@ -1,4 +1,4 @@ database.driver=com.mysql.cj.jdbc.Driver -database.url=jdbc:mysql://flipkart.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/flipkart +database.url=jdbc:mysql://learnwithprojects-com.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/learnwithprojectsCom database.username=admin database.password=welcome1 diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 6ff0bae..184f741 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -14,11 +14,11 @@ dbURL - jdbc:mysql://flipkart.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/ + jdbc:mysql://learnwithprojects-com.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/ dbName - flipkart + learnwithprojectsCom LoginServlet From f11bb417feb85f160d4355dfed2e311fd9aac151 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Fri, 12 Mar 2021 17:45:51 +0530 Subject: [PATCH 06/52] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 41ebbe4..4e2c751 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Ansible project completed


+

Welccome to CGI.com


Login
Register
From be8862490143b9970e9ef7e59ef406dd16621d2c Mon Sep 17 00:00:00 2001 From: root Date: Mon, 22 Mar 2021 06:02:04 +0000 Subject: [PATCH 07/52] 11am weekday class --- src/main/java/com/example/DbUtil.java | 2 +- src/main/java/com/example/application.properties | 2 +- src/main/webapp/WEB-INF/web.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/example/DbUtil.java b/src/main/java/com/example/DbUtil.java index 8adb834..d881c0c 100644 --- a/src/main/java/com/example/DbUtil.java +++ b/src/main/java/com/example/DbUtil.java @@ -9,7 +9,7 @@ public class DbUtil { static Connection con=null; static String driver = "com.mysql.cj.jdbc.Driver"; - static String url = "jdbc:mysql://learnwithprojects-com.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/learnwithprojectsCom"; + static String url = "jdbc:mysql://learnwithproject-com.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/flipkart"; static String username = "admin"; static String password = "welcome1"; diff --git a/src/main/java/com/example/application.properties b/src/main/java/com/example/application.properties index abbdb19..9190e43 100644 --- a/src/main/java/com/example/application.properties +++ b/src/main/java/com/example/application.properties @@ -1,4 +1,4 @@ database.driver=com.mysql.cj.jdbc.Driver -database.url=jdbc:mysql://learnwithprojects-com.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/learnwithprojectsCom +database.url=jdbc:mysql://learnwithproject-com.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/flipkart database.username=admin database.password=welcome1 diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 184f741..10e424f 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -14,11 +14,11 @@ dbURL - jdbc:mysql://learnwithprojects-com.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/ + jdbc:mysql://learnwithproject-com.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/ dbName - learnwithprojectsCom + flipkart LoginServlet From b06a730e25725443918c43dff8f1af3c72d9dcd5 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Mon, 5 Apr 2021 10:06:08 +0530 Subject: [PATCH 08/52] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 4e2c751..4ea50a6 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welccome to CGI.com


+

Welcome to devops class


Login
Register
From 18baceddec9f73a4118c9b5703aa39693532883e Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Tue, 20 Apr 2021 10:18:10 +0530 Subject: [PATCH 09/52] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 4ea50a6..9350200 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome to devops class


+

Chef Project CICD Test


Login
Register
From a18a46452ed31ce1c5ee697dc6bb85eb8444c254 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 2 May 2021 05:48:50 +0000 Subject: [PATCH 10/52] dipti rds test --- src/main/java/com/example/DbUtil.java | 6 +- src/main/java/com/example/DbUtil.java-bkp | 83 +++++++++++++++++++ .../java/com/example/application.properties | 6 +- src/main/webapp/WEB-INF/web.xml | 8 +- 4 files changed, 93 insertions(+), 10 deletions(-) create mode 100644 src/main/java/com/example/DbUtil.java-bkp diff --git a/src/main/java/com/example/DbUtil.java b/src/main/java/com/example/DbUtil.java index d881c0c..b85252e 100644 --- a/src/main/java/com/example/DbUtil.java +++ b/src/main/java/com/example/DbUtil.java @@ -9,9 +9,9 @@ public class DbUtil { static Connection con=null; static String driver = "com.mysql.cj.jdbc.Driver"; - static String url = "jdbc:mysql://learnwithproject-com.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/flipkart"; - static String username = "admin"; - static String password = "welcome1"; + static String url = "jdbc:mysql://testdb.cfrurxflalzb.ca-central-1.rds.amazonaws.com:3306/testdb"; + static String username = "master"; + static String password = "Welcome123"; static { try { diff --git a/src/main/java/com/example/DbUtil.java-bkp b/src/main/java/com/example/DbUtil.java-bkp new file mode 100644 index 0000000..d881c0c --- /dev/null +++ b/src/main/java/com/example/DbUtil.java-bkp @@ -0,0 +1,83 @@ +package com.example; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +public class DbUtil { + static Connection con=null; + static String driver = "com.mysql.cj.jdbc.Driver"; + static String url = "jdbc:mysql://learnwithproject-com.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/flipkart"; + static String username = "admin"; + static String password = "welcome1"; + + static { + try { + /* + Properties prop = new Properties(); + prop.load(DbUtil.class.getResourceAsStream("application.properties")); + String driver = prop.getProperty("database.driver"); + String url = prop.getProperty("database.url"); + String username = prop.getProperty("database.username"); + String password = prop.getProperty("database.password"); + */ + Class.forName(driver); + con = DriverManager.getConnection(url, username, password); + System.out.println("database connected..."); + + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } catch(SQLException e) { + e.printStackTrace(); + } + + } + + + public static int register(String name, String password, String address, int age, String profession) { + + int rows = 0; + + try { + PreparedStatement pst = con.prepareStatement("INSERT INTO user VALUES(?,?,?,?,?)"); + + pst.setString(1,name); + pst.setString(2, password); + pst.setString(3, address); + pst.setInt(4, age); + pst.setString(5, profession); + + rows = pst.executeUpdate(); + + }catch(Exception e) { + e.printStackTrace(); + } + + return rows; + } + + public static int login(String name, String password) { + + int rows = 0; + + try { + PreparedStatement pst = con.prepareStatement("SELECT * FROM user WHERE name = ? AND password = ?"); + + pst.setString(1,name); + pst.setString(2, password); + + + ResultSet rs = pst.executeQuery(); + + if(rs.next()) + rows = 1; + + }catch(Exception e) { + e.printStackTrace(); + } + + return rows; + } +} diff --git a/src/main/java/com/example/application.properties b/src/main/java/com/example/application.properties index 9190e43..1d077ff 100644 --- a/src/main/java/com/example/application.properties +++ b/src/main/java/com/example/application.properties @@ -1,4 +1,4 @@ database.driver=com.mysql.cj.jdbc.Driver -database.url=jdbc:mysql://learnwithproject-com.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/flipkart -database.username=admin -database.password=welcome1 +database.url=jdbc:mysql://testdb.cfrurxflalzb.ca-central-1.rds.amazonaws.com:3306/testdb +database.username=master +database.password=Welcome123 diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 10e424f..14159b1 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -6,19 +6,19 @@ Archetype Created Web Application dbUser - admin + master dbPassword - welcome1 + Welcome123 dbURL - jdbc:mysql://learnwithproject-com.cqsb5fmzx3vh.ap-south-1.rds.amazonaws.com:3306/ + jdbc:mysql://testdb.cfrurxflalzb.ca-central-1.rds.amazonaws.com:3306 dbName - flipkart + testdb LoginServlet From 65cf576c324e81d2ace545824d6a0af2caba5a17 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 2 May 2021 05:57:48 +0000 Subject: [PATCH 11/52] added / --- src/main/webapp/WEB-INF/web.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 14159b1..f431a16 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -14,7 +14,7 @@ dbURL - jdbc:mysql://testdb.cfrurxflalzb.ca-central-1.rds.amazonaws.com:3306 + jdbc:mysql://testdb.cfrurxflalzb.ca-central-1.rds.amazonaws.com:3306/ dbName From ab188369779e09119c250de0235799b708c32d67 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 2 May 2021 06:05:28 +0000 Subject: [PATCH 12/52] added / --- src/main/webapp/WEB-INF/web.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index f431a16..14159b1 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -14,7 +14,7 @@ dbURL - jdbc:mysql://testdb.cfrurxflalzb.ca-central-1.rds.amazonaws.com:3306/ + jdbc:mysql://testdb.cfrurxflalzb.ca-central-1.rds.amazonaws.com:3306 dbName From d2ecf857e9acca1ea57a3a1b0113ad497d5908d8 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Fri, 18 Jun 2021 08:55:40 +0530 Subject: [PATCH 13/52] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 9350200..938cd3f 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Chef Project CICD Test


+

Chef Project CICD


Login
Register
From a470c15748b6d7947a9a89c1e6bf7cfc54fe9ac7 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sun, 25 Jul 2021 08:42:39 +0530 Subject: [PATCH 14/52] Create Jenkinsfile-parameters --- Jenkinsfile-parameters | 59 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Jenkinsfile-parameters diff --git a/Jenkinsfile-parameters b/Jenkinsfile-parameters new file mode 100644 index 0000000..565b135 --- /dev/null +++ b/Jenkinsfile-parameters @@ -0,0 +1,59 @@ +pipeline { + agent any + parameters { + choice choices: ['develop', 'release', 'master'], description: 'Please provide the branch name so that we can deploy', name: 'branch' + } + + triggers { + pollSCM 'H/2 * * * * ' + } + tools { + maven 'maven' + } + environment { + project_type = 'java' + DEPLOY_TO = 'production' + } + stages { + stage('git fetch') { + steps { + git branch: "${params.branch}", credentialsId: '4991f864-6845-456a-90df-f0f62edcdc79', url: 'https://github.com/mailrahulsre/java-db-Login.git' + } + } + + stage('Build the code') { + when{ + environment name: 'project_type', value: 'java' + } + steps { + sh 'mvn -Dmaven.test.failure.ignore=true clean package' + echo "deploying to ${DEPLOY_TO} Env " + deploy adapters: [tomcat8(credentialsId: 'tomcat-cred', path: '', url: 'http://172.31.32.223:8080')], contextPath: 'login-release-branch', onFailure: false, war: '**/*.war' + } + } + + } + post { + always { + echo "You can always see me" + } + success { + + + + echo "I am running because the job ran successfully" + //sh '/usr/local/bin/aws s3 cp /jenkins-home/workspace/stage-tavisca/target/LoginRegisterApp.war s3://9am-weekend-jul/$JOB_NAME/${BUILD_NUMBER}/' + + + + + } + unstable { + echo "Gear up ! The build is unstable. Try fix it" + } + failure { + echo "OMG ! The build failed" + } + } + +} From a527ac090549ae49de221a4c762eff24eaa4396b Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sun, 25 Jul 2021 08:44:03 +0530 Subject: [PATCH 15/52] Update and rename Jenkinsfile-parameters to Jenkinsfile-parameterized-tomcat-deploy --- ...ile-parameters => Jenkinsfile-parameterized-tomcat-deploy | 5 +++++ 1 file changed, 5 insertions(+) rename Jenkinsfile-parameters => Jenkinsfile-parameterized-tomcat-deploy (96%) diff --git a/Jenkinsfile-parameters b/Jenkinsfile-parameterized-tomcat-deploy similarity index 96% rename from Jenkinsfile-parameters rename to Jenkinsfile-parameterized-tomcat-deploy index 565b135..552f680 100644 --- a/Jenkinsfile-parameters +++ b/Jenkinsfile-parameterized-tomcat-deploy @@ -4,16 +4,21 @@ pipeline { choice choices: ['develop', 'release', 'master'], description: 'Please provide the branch name so that we can deploy', name: 'branch' } +// not required in case of parameterized + triggers { pollSCM 'H/2 * * * * ' } + tools { maven 'maven' } + environment { project_type = 'java' DEPLOY_TO = 'production' } + stages { stage('git fetch') { steps { From e4c47f99903f3b25562c5c4c0c59a0171017e5ff Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Mon, 26 Jul 2021 10:00:56 +0530 Subject: [PATCH 16/52] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 938cd3f..7561f53 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Chef Project CICD


+

Apply for HomeLoan


Login
Register
From 11681ff485b2d3b484e43cb09c7d2be5c96d63f7 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sat, 7 Aug 2021 20:11:40 +0530 Subject: [PATCH 17/52] Create Jenkinsfile-homeloan --- Jenkinsfile-homeloan | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Jenkinsfile-homeloan diff --git a/Jenkinsfile-homeloan b/Jenkinsfile-homeloan new file mode 100644 index 0000000..54d7f6a --- /dev/null +++ b/Jenkinsfile-homeloan @@ -0,0 +1,29 @@ +pipeline { + agent any + tools { + maven 'MAVEN_PATH' + } + + stages { + stage('Fetch') { + steps { + echo 'fetch the code' + git credentialsId: 'github-cred', url: 'https://github.com/mailrahulsre/java-db-Login.git' + } + } + + stage('Build') { + steps { + echo 'Maven Build' + sh 'mvn clean package' } + + } + + stage('post build') { + steps { + echo 'Post build' + deploy adapters: [tomcat8(credentialsId: 'tomcat-cred', path: '', url: 'http://172.31.37.61:8080')], contextPath: 'homeloan', onFailure: false, war: '**/*.war' + } + } + } + } From ff2c818c60dee3dd1ae66b22b7c5ba16818106a6 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 7 Aug 2021 14:55:43 +0000 Subject: [PATCH 18/52] file updated --- src/main/java/com/example/DbUtil.java | 2 +- src/main/java/com/example/application.properties | 2 +- src/main/webapp/WEB-INF/web.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/example/DbUtil.java b/src/main/java/com/example/DbUtil.java index b85252e..f097df7 100644 --- a/src/main/java/com/example/DbUtil.java +++ b/src/main/java/com/example/DbUtil.java @@ -9,7 +9,7 @@ public class DbUtil { static Connection con=null; static String driver = "com.mysql.cj.jdbc.Driver"; - static String url = "jdbc:mysql://testdb.cfrurxflalzb.ca-central-1.rds.amazonaws.com:3306/testdb"; + static String url = "jdbc:mysql://flipkart.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306/homeloan"; static String username = "master"; static String password = "Welcome123"; diff --git a/src/main/java/com/example/application.properties b/src/main/java/com/example/application.properties index 1d077ff..fd1f157 100644 --- a/src/main/java/com/example/application.properties +++ b/src/main/java/com/example/application.properties @@ -1,4 +1,4 @@ database.driver=com.mysql.cj.jdbc.Driver -database.url=jdbc:mysql://testdb.cfrurxflalzb.ca-central-1.rds.amazonaws.com:3306/testdb +database.url=jdbc:mysql://flipkart.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306/homeloan database.username=master database.password=Welcome123 diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 14159b1..d05f306 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -14,11 +14,11 @@ dbURL - jdbc:mysql://testdb.cfrurxflalzb.ca-central-1.rds.amazonaws.com:3306 + jdbc:mysql://flipkart.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306 dbName - testdb + homeloan LoginServlet From cb491f7b5a54ce6679a9039a1b3ffda78ccfc3b7 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Tue, 10 Aug 2021 10:24:52 +0530 Subject: [PATCH 19/52] Create jenkinsfile-chef-example --- jenkinsfile-chef-example | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 jenkinsfile-chef-example diff --git a/jenkinsfile-chef-example b/jenkinsfile-chef-example new file mode 100644 index 0000000..62189cd --- /dev/null +++ b/jenkinsfile-chef-example @@ -0,0 +1,34 @@ +pipeline { + agent any + + tools { + // Install the Maven version configured as "M3" and add it to the path. + maven "MAVEN_PATH" + } + + stages { + stage('fetch the code') { + steps { + git credentialsId: 'github-cred', url: 'https://github.com/mailrahulsre/java-db-Login.git' + } + } + stage('Build the code') { + steps { + //tool name: 'maven', type: 'maven' + sh 'mvn clean package' + } + } + } + post { + success { + s3Upload consoleLogLevel: 'INFO', dontSetBuildResultOnFailure: false, dontWaitForConcurrentBuildCompletion: false, entries: [[bucket: 'artifactory-9am-weekday-jul', excludedFile: 'target', flatten: true, gzipFiles: false, keepForever: false, managedArtifacts: false, noUploadOnFailure: true, selectedRegion: 'ap-south-1', showDirectlyInBrowser: false, sourceFile: '**/*.war', storageClass: 'STANDARD', uploadFromSlave: false, useServerSideEncryption: false]], pluginFailureResultConstraint: 'FAILURE', profileName: 's3profile', userMetadata: [] + } + unstable { + echo "Gear up ! The build is unstable. Try fix it" + } + failure { + echo "OMG ! The build failed" + } + } + +} From a717748401adc101d456749a38d4e90ec2b96bd2 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Tue, 10 Aug 2021 10:25:03 +0530 Subject: [PATCH 20/52] Create jenkinsfile-chef --- jenkinsfile-chef | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 jenkinsfile-chef diff --git a/jenkinsfile-chef b/jenkinsfile-chef new file mode 100644 index 0000000..62189cd --- /dev/null +++ b/jenkinsfile-chef @@ -0,0 +1,34 @@ +pipeline { + agent any + + tools { + // Install the Maven version configured as "M3" and add it to the path. + maven "MAVEN_PATH" + } + + stages { + stage('fetch the code') { + steps { + git credentialsId: 'github-cred', url: 'https://github.com/mailrahulsre/java-db-Login.git' + } + } + stage('Build the code') { + steps { + //tool name: 'maven', type: 'maven' + sh 'mvn clean package' + } + } + } + post { + success { + s3Upload consoleLogLevel: 'INFO', dontSetBuildResultOnFailure: false, dontWaitForConcurrentBuildCompletion: false, entries: [[bucket: 'artifactory-9am-weekday-jul', excludedFile: 'target', flatten: true, gzipFiles: false, keepForever: false, managedArtifacts: false, noUploadOnFailure: true, selectedRegion: 'ap-south-1', showDirectlyInBrowser: false, sourceFile: '**/*.war', storageClass: 'STANDARD', uploadFromSlave: false, useServerSideEncryption: false]], pluginFailureResultConstraint: 'FAILURE', profileName: 's3profile', userMetadata: [] + } + unstable { + echo "Gear up ! The build is unstable. Try fix it" + } + failure { + echo "OMG ! The build failed" + } + } + +} From 4a88fea2aac6198cf9c634809521c3ed4c671cbd Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Tue, 10 Aug 2021 10:26:40 +0530 Subject: [PATCH 21/52] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 7561f53..f3f60a9 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Apply for HomeLoan


+

Apply for HomeLoan. Low Rate of Interest


Login
Register
From 519da53ff93e5a63cc2bc32f995de1f59d95f996 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Wed, 8 Sep 2021 13:02:39 +0530 Subject: [PATCH 22/52] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index f3f60a9..20ea82e 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Apply for HomeLoan. Low Rate of Interest


+

Hello Students. Enjoy Maven Class


Login
Register
From 5fe04a0178b981a404151807ef4411fb1346c415 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Thu, 23 Sep 2021 08:49:22 +0530 Subject: [PATCH 23/52] Update Jenkinsfile-homeloan --- Jenkinsfile-homeloan | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile-homeloan b/Jenkinsfile-homeloan index 54d7f6a..6b27d95 100644 --- a/Jenkinsfile-homeloan +++ b/Jenkinsfile-homeloan @@ -1,7 +1,7 @@ pipeline { agent any tools { - maven 'MAVEN_PATH' + maven 'maven3.8.1' } stages { From c30174ba1ce5ecd5a2c86ff9656bde8ec162ab61 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Thu, 23 Sep 2021 08:51:13 +0530 Subject: [PATCH 24/52] Update Jenkinsfile-homeloan --- Jenkinsfile-homeloan | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile-homeloan b/Jenkinsfile-homeloan index 6b27d95..b77a1ec 100644 --- a/Jenkinsfile-homeloan +++ b/Jenkinsfile-homeloan @@ -12,7 +12,7 @@ pipeline { } } - stage('Build') { + stage('Build maven job') { steps { echo 'Maven Build' sh 'mvn clean package' } From 57052ffeddd2b5d4dc4e2977b0029ab6ae5108d0 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Thu, 23 Sep 2021 08:52:04 +0530 Subject: [PATCH 25/52] Update Jenkinsfile-homeloan --- Jenkinsfile-homeloan | 53 +++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/Jenkinsfile-homeloan b/Jenkinsfile-homeloan index b77a1ec..499097d 100644 --- a/Jenkinsfile-homeloan +++ b/Jenkinsfile-homeloan @@ -1,29 +1,36 @@ pipeline { agent any + tools { - maven 'maven3.8.1' + // Install the Maven version configured as "M3" and add it to the path. + maven "maven3.8.1" + } + +stages { + stage('fetch the code') { + steps { + // One or more steps need to be included within the steps block. + git credentialsId: 'github-cred', url: 'https://github.com/mailrahulsre/java-db-Login.git' + } + } + + stage('Build the code') { + steps { + // One or more steps need to be included within the steps block. + echo "build" + sh 'mvn clean package' } + } - stages { - stage('Fetch') { - steps { - echo 'fetch the code' - git credentialsId: 'github-cred', url: 'https://github.com/mailrahulsre/java-db-Login.git' - } - } - - stage('Build maven job') { - steps { - echo 'Maven Build' - sh 'mvn clean package' } - - } - - stage('post build') { - steps { - echo 'Post build' - deploy adapters: [tomcat8(credentialsId: 'tomcat-cred', path: '', url: 'http://172.31.37.61:8080')], contextPath: 'homeloan', onFailure: false, war: '**/*.war' - } - } - } + stage('Post Build') { + steps { + // One or more steps need to be included within the steps block. + echo "post-build" + deploy adapters: [tomcat7(credentialsId: 'admin-tomcat-lwplabs', path: '', url: 'http://ip-172-31-1-167.ap-south-1.compute.internal:8080/')], contextPath: 'login', onFailure: false, war: '**/*.war' } + } + +} + + +} From 8b163e8257b83360c0aa33908291dcfb2c0b6a22 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 2 Oct 2021 05:30:07 +0000 Subject: [PATCH 26/52] db details changed --- src/main/java/com/example/DbUtil.java | 6 +++--- src/main/java/com/example/application.properties | 6 +++--- src/main/webapp/WEB-INF/web.xml | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/example/DbUtil.java b/src/main/java/com/example/DbUtil.java index f097df7..4182238 100644 --- a/src/main/java/com/example/DbUtil.java +++ b/src/main/java/com/example/DbUtil.java @@ -9,9 +9,9 @@ public class DbUtil { static Connection con=null; static String driver = "com.mysql.cj.jdbc.Driver"; - static String url = "jdbc:mysql://flipkart.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306/homeloan"; - static String username = "master"; - static String password = "Welcome123"; + static String url = "jdbc:mysql://lwplabs.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306/lwplabs"; + static String username = "admin"; + static String password = "welcome123"; static { try { diff --git a/src/main/java/com/example/application.properties b/src/main/java/com/example/application.properties index fd1f157..c64f829 100644 --- a/src/main/java/com/example/application.properties +++ b/src/main/java/com/example/application.properties @@ -1,4 +1,4 @@ database.driver=com.mysql.cj.jdbc.Driver -database.url=jdbc:mysql://flipkart.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306/homeloan -database.username=master -database.password=Welcome123 +database.url=jdbc:mysql://lwplabs.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306/lwplabs +database.username=admin +database.password=welcome123 diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index d05f306..0e48ef2 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -6,19 +6,19 @@ Archetype Created Web Application dbUser - master + admin dbPassword - Welcome123 + welcome123 dbURL - jdbc:mysql://flipkart.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306 + jdbc:mysql://lwplabs.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306 dbName - homeloan + lwplabs LoginServlet From 3d0aebb7c6a1d1f29eef09d13433fa3057925862 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Wed, 6 Oct 2021 09:53:29 +0530 Subject: [PATCH 27/52] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 20ea82e..a07c106 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Hello Students. Enjoy Maven Class


+

Hello Students. This is POC, we have to complete this whole project by us within 15hrs


Login
Register
From 801cbeafee2e8c65eee9b29b3779f82dc6710106 Mon Sep 17 00:00:00 2001 From: rahul Date: Wed, 6 Oct 2021 12:12:01 +0000 Subject: [PATCH 28/52] index.html updated for Trianz.com --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index a07c106..78bebc5 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Hello Students. This is POC, we have to complete this whole project by us within 15hrs


+

Hello Students. This is POC for Single Node Architecture. We will do Multinode architecture using Ansible


Login
Register
From e76fd0cc93a4a5a14493fda38184e5f85282ed65 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Wed, 17 Nov 2021 10:04:44 +0530 Subject: [PATCH 29/52] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 78bebc5..d32e81d 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Hello Students. This is POC for Single Node Architecture. We will do Multinode architecture using Ansible


+

This is imp project for Maven


Login
Register
From d2a56e9c1efbcc78e47c880a3740239f92a61f74 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Wed, 17 Nov 2021 10:06:38 +0530 Subject: [PATCH 30/52] Update pom.xml --- pom.xml | 52 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 14 deletions(-) diff --git a/pom.xml b/pom.xml index ebb92b6..5b644e5 100644 --- a/pom.xml +++ b/pom.xml @@ -3,24 +3,24 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 com.access - LoginRegisterApp + login war - 1.1 + 1.0 LoginRegisterApp Maven Webapp http://maven.apache.org - + - - mysql - mysql-connector-java - 8.0.20 - + + mysql + mysql-connector-java + 8.0.20 + - javax.servlet - javax.servlet-api - 3.0.1 - + javax.servlet + javax.servlet-api + 3.0.1 + junit @@ -29,8 +29,32 @@ test - + - LoginRegisterApp + ${project.artifactId}##${project.version} + + + + org.apache.tomcat.maven + tomcat7-maven-plugin + 2.2 + + /${project.artifactId}##${project.version} + http://172.31.19.199:8080/manager/text + admin + ******* + true + + + + + + + src/main/resources + true + + + + From 70425c81fed8d73ec9d60da5156f2d58bfce127d Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Wed, 17 Nov 2021 10:08:29 +0530 Subject: [PATCH 31/52] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index d32e81d..c2e68a3 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

This is imp project for Maven


+

This is imp project for Maven. please complete it


Login
Register
From ec429537a37b506cbec197c862950b0280374b07 Mon Sep 17 00:00:00 2001 From: adis2hope <40731640+adis2hope@users.noreply.github.com> Date: Sun, 5 Dec 2021 09:50:23 +0530 Subject: [PATCH 32/52] db updated --- src/main/java/com/example/DbUtil.java | 2 +- src/main/java/com/example/application.properties | 2 +- src/main/webapp/WEB-INF/web.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/example/DbUtil.java b/src/main/java/com/example/DbUtil.java index 4182238..68571df 100644 --- a/src/main/java/com/example/DbUtil.java +++ b/src/main/java/com/example/DbUtil.java @@ -9,7 +9,7 @@ public class DbUtil { static Connection con=null; static String driver = "com.mysql.cj.jdbc.Driver"; - static String url = "jdbc:mysql://lwplabs.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306/lwplabs"; + static String url = "jdbc:mysql://lwplabs.cojh5a5pj8rf.us-east-1.rds.amazonaws.com:3306/lwplabs"; static String username = "admin"; static String password = "welcome123"; diff --git a/src/main/java/com/example/application.properties b/src/main/java/com/example/application.properties index c64f829..1fc7714 100644 --- a/src/main/java/com/example/application.properties +++ b/src/main/java/com/example/application.properties @@ -1,4 +1,4 @@ database.driver=com.mysql.cj.jdbc.Driver -database.url=jdbc:mysql://lwplabs.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306/lwplabs +database.url=jdbc:mysql://lwplabs.cojh5a5pj8rf.us-east-1.rds.amazonaws.com:3306/lwplabs database.username=admin database.password=welcome123 diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 0e48ef2..07c0bf3 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -14,7 +14,7 @@ dbURL - jdbc:mysql://lwplabs.ctsskph1rwug.ap-south-1.rds.amazonaws.com:3306 + jdbc:mysql://lwplabs.cojh5a5pj8rf.us-east-1.rds.amazonaws.com:3306 dbName From ae1a0df80cff68fa17ef0db85fad1ba8071d7ff2 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Sun, 5 Dec 2021 19:58:02 +0530 Subject: [PATCH 33/52] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index c2e68a3..c2b17fc 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

This is imp project for Maven. please complete it


+

Student form


Login
Register
From 35ffc7b5e8091e19faab14b8c968096616510be7 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Fri, 10 Dec 2021 11:42:51 +0530 Subject: [PATCH 34/52] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index c2b17fc..27e144f 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Student form


+

Welcome Students


Login
Register
From 20c2ecf2580e18c9de712965a6e8ee9ef31e0bb8 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Tue, 11 Jan 2022 09:39:26 +0530 Subject: [PATCH 35/52] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 27e144f..22d2393 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome Students


+

Welcome to Devops Class


Login
Register
From 1295acf784099b5a94bd0f8be4ff854d553bd9e1 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Tue, 11 Jan 2022 12:12:41 +0530 Subject: [PATCH 36/52] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 22d2393..9295819 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome to Devops Class


+

Welcome to maven Class


Login
Register
From 397e5a2756ce500d184be5db4df13926640da7fb Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Wed, 19 Jan 2022 11:52:56 +0530 Subject: [PATCH 37/52] Create jenkinsfile-11am2022-jan --- jenkinsfile-11am2022-jan | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 jenkinsfile-11am2022-jan diff --git a/jenkinsfile-11am2022-jan b/jenkinsfile-11am2022-jan new file mode 100644 index 0000000..6d28220 --- /dev/null +++ b/jenkinsfile-11am2022-jan @@ -0,0 +1,29 @@ +pipeline { + agent any + + tools { + maven 'maven-3.8.3' + } + + stages { + + stage('fetching the code') { + steps { + git credentialsId: 'github-cred', url: 'https://github.com/mailrahulsre/java-db-Login.git' + } + } + + stage('build the code') { + steps { + sh 'mvn clean package' + } + } + + stage('deploy the code') { + steps { + deploy adapters: [tomcat8(credentialsId: 'admin-tomcat-dev-lwplabs', + path: '', url: 'http://172.31.91.71:8080')], contextPath: 'login', onFailure: false, war: '**/*.war' + } + } + } +} From 3b47e1f6bfa00ff91ea6e2696574ebc0eba18658 Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Wed, 19 Jan 2022 11:58:23 +0530 Subject: [PATCH 38/52] Update jenkinsfile-11am2022-jan --- jenkinsfile-11am2022-jan | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkinsfile-11am2022-jan b/jenkinsfile-11am2022-jan index 6d28220..904285a 100644 --- a/jenkinsfile-11am2022-jan +++ b/jenkinsfile-11am2022-jan @@ -22,7 +22,7 @@ pipeline { stage('deploy the code') { steps { deploy adapters: [tomcat8(credentialsId: 'admin-tomcat-dev-lwplabs', - path: '', url: 'http://172.31.91.71:8080')], contextPath: 'login', onFailure: false, war: '**/*.war' + path: '', url: 'http://172.31.91.71:8080')], contextPath: 'login-lwplabs', onFailure: false, war: '**/*.war' } } } From 42e3992e374600b8bee9bd14e891bd30f3159f0b Mon Sep 17 00:00:00 2001 From: mailrahulsre <59342234+mailrahulsre@users.noreply.github.com> Date: Tue, 26 Apr 2022 09:28:19 +0530 Subject: [PATCH 39/52] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 9295819..936fb78 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome to maven Class


+

Welcome to Major project 7


Login
Register
From 76e99f0d2932c18a1f39bf307f8e3f43111791d5 Mon Sep 17 00:00:00 2001 From: adis2hope <40731640+adis2hope@users.noreply.github.com> Date: Mon, 16 May 2022 09:30:07 +0530 Subject: [PATCH 40/52] db changed --- src/main/java/com/example/DbUtil.java | 4 ++-- src/main/java/com/example/application.properties | 4 ++-- src/main/webapp/WEB-INF/web.xml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/example/DbUtil.java b/src/main/java/com/example/DbUtil.java index 68571df..3e28b3a 100644 --- a/src/main/java/com/example/DbUtil.java +++ b/src/main/java/com/example/DbUtil.java @@ -10,8 +10,8 @@ public class DbUtil { static Connection con=null; static String driver = "com.mysql.cj.jdbc.Driver"; static String url = "jdbc:mysql://lwplabs.cojh5a5pj8rf.us-east-1.rds.amazonaws.com:3306/lwplabs"; - static String username = "admin"; - static String password = "welcome123"; + static String username = "master"; + static String password = "welcome1"; static { try { diff --git a/src/main/java/com/example/application.properties b/src/main/java/com/example/application.properties index 1fc7714..e09ed78 100644 --- a/src/main/java/com/example/application.properties +++ b/src/main/java/com/example/application.properties @@ -1,4 +1,4 @@ database.driver=com.mysql.cj.jdbc.Driver database.url=jdbc:mysql://lwplabs.cojh5a5pj8rf.us-east-1.rds.amazonaws.com:3306/lwplabs -database.username=admin -database.password=welcome123 +database.username=master +database.password=welcome1 diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 07c0bf3..957a79f 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -6,11 +6,11 @@ Archetype Created Web Application dbUser - admin + master dbPassword - welcome123 + welcome1 dbURL From d71e1c74aad7b32cd12174284313b64087a88b0e Mon Sep 17 00:00:00 2001 From: adis2hope <40731640+adis2hope@users.noreply.github.com> Date: Sat, 17 Dec 2022 09:47:10 -0500 Subject: [PATCH 41/52] file updated to test maven 2nd project --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 936fb78..d128852 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome to Major project 7


+

Welcome to Maven Project


Login
Register
From a9cb2e0244c88bf4e8c66f8d661271bff851e73a Mon Sep 17 00:00:00 2001 From: adis2hope <40731640+adis2hope@users.noreply.github.com> Date: Sat, 17 Dec 2022 09:57:47 -0500 Subject: [PATCH 42/52] Maven project test --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index d128852..cdb9294 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Welcome to Maven Project


+

Maven Project is completed


Login
Register
From 0be58af0ad9007b2a5a5e8ecf87e6487c2146d53 Mon Sep 17 00:00:00 2001 From: adis2hope <40731640+adis2hope@users.noreply.github.com> Date: Mon, 26 Dec 2022 08:36:04 -0500 Subject: [PATCH 43/52] first foundation Project is completed --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index cdb9294..97b393f 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Maven Project is completed


+

first foundation Project is completed


Login
Register
From 528969428743f4795ce0393f9b92e20c25e04fca Mon Sep 17 00:00:00 2001 From: devopscloudsre <59342234+devopscloudsre@users.noreply.github.com> Date: Mon, 20 Nov 2023 10:45:54 -0500 Subject: [PATCH 44/52] Update index.html --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 97b393f..8dfd1b1 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

first foundation Project is completed


+

first foundation Project is completed......


Login
Register
From c0f6a7da5868a30394226cc86d3dc6ad94026fbe Mon Sep 17 00:00:00 2001 From: mailrahulsre Date: Wed, 18 Sep 2024 20:23:32 -0400 Subject: [PATCH 45/52] jenkins file for prod created --- jenkinsfile-b94 | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 jenkinsfile-b94 diff --git a/jenkinsfile-b94 b/jenkinsfile-b94 new file mode 100644 index 0000000..9d6612a --- /dev/null +++ b/jenkinsfile-b94 @@ -0,0 +1,32 @@ +pipeline { + agent any + + tools { + // Install the Maven version configured as "M3" and add it to the path. + maven "maven" + } + + stages { + stage('fetch the code') { + steps { + git branch: 'master', credentialsId: 'github-cred', url: 'https://github.com/devopscloudsre/java-db-Login.git' + } + } + + stage('build the code') { + steps { + sh 'mvn clean package' + } + post { + // If Maven was able to run the tests, even if some of the test + // failed, record the test results and archive the jar file. + success { + deploy adapters: [tomcat9(credentialsId: 'tomcat-admin-user', path: '', url: 'http://172.31.29.76:8080')], contextPath: '/prod-login', onFailure: false, war: '**/*.war' + } + failure { + echo "OMG ! The build failed" + } + } + } + } +} \ No newline at end of file From 90f7a9c49cdd73236e884f77ccea59f26d8964cc Mon Sep 17 00:00:00 2001 From: mailrahulsre Date: Wed, 18 Sep 2024 20:38:12 -0400 Subject: [PATCH 46/52] login.html changed and jenkinsfileb94 modified --- jenkinsfile-b94 | 4 ++++ src/main/webapp/index.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/jenkinsfile-b94 b/jenkinsfile-b94 index 9d6612a..34f7fc2 100644 --- a/jenkinsfile-b94 +++ b/jenkinsfile-b94 @@ -6,6 +6,10 @@ pipeline { maven "maven" } + triggers { + githubPush() + } + stages { stage('fetch the code') { steps { diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 8dfd1b1..4d3adc9 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

first foundation Project is completed......


+

Prod Lwplabs Job......


Login
Register
From bc8b8c272f3124bd2e8160e9b9f451b25149ec3f Mon Sep 17 00:00:00 2001 From: mailrahulsre Date: Wed, 18 Sep 2024 20:41:18 -0400 Subject: [PATCH 47/52] login.html changed and jenkinsfileb94 modified --- src/main/webapp/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 4d3adc9..08cd072 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,6 +1,6 @@ -

Prod Lwplabs Job......


+

Prod Lwplabs test 2......


Login
Register
From 7f4d593bb96910203d03aac1c6249be242879e0a Mon Sep 17 00:00:00 2001 From: mailrahulsre Date: Wed, 18 Sep 2024 20:59:54 -0400 Subject: [PATCH 48/52] jenkinsfile --- jenkinsfile-b94 => jenkinsfile-dev-b94 | 4 +-- jenkinsfile-stage-prod-b94 | 34 ++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) rename jenkinsfile-b94 => jenkinsfile-dev-b94 (82%) create mode 100644 jenkinsfile-stage-prod-b94 diff --git a/jenkinsfile-b94 b/jenkinsfile-dev-b94 similarity index 82% rename from jenkinsfile-b94 rename to jenkinsfile-dev-b94 index 34f7fc2..2ea90a0 100644 --- a/jenkinsfile-b94 +++ b/jenkinsfile-dev-b94 @@ -13,7 +13,7 @@ pipeline { stages { stage('fetch the code') { steps { - git branch: 'master', credentialsId: 'github-cred', url: 'https://github.com/devopscloudsre/java-db-Login.git' + git branch: 'develop', credentialsId: 'github-cred', url: 'https://github.com/devopscloudsre/java-db-Login.git' } } @@ -25,7 +25,7 @@ pipeline { // If Maven was able to run the tests, even if some of the test // failed, record the test results and archive the jar file. success { - deploy adapters: [tomcat9(credentialsId: 'tomcat-admin-user', path: '', url: 'http://172.31.29.76:8080')], contextPath: '/prod-login', onFailure: false, war: '**/*.war' + deploy adapters: [tomcat9(credentialsId: 'tomcat-admin-user', path: '', url: 'http://172.31.29.76:8080')], contextPath: '/dev-login', onFailure: false, war: '**/*.war' } failure { echo "OMG ! The build failed" diff --git a/jenkinsfile-stage-prod-b94 b/jenkinsfile-stage-prod-b94 new file mode 100644 index 0000000..7ded2ef --- /dev/null +++ b/jenkinsfile-stage-prod-b94 @@ -0,0 +1,34 @@ +pipeline { + agent any + + tools { + // Install the Maven version configured as "M3" and add it to the path. + maven "maven" + } + + parameters { + choice(name: 'BRANCH', choices: ['master', 'stage'], description: 'Choose branch') + } + + stages { + stage('fetch the code') { + steps { + git branch: '${params.BRANCH}', credentialsId: 'github-cred', url: 'https://github.com/devopscloudsre/java-db-Login.git' + } + } + + stage('build the code') { + steps { + sh 'mvn clean package' + } + post { + success { + deploy adapters: [tomcat9(credentialsId: 'tomcat-admin-user', path: '', url: 'http://172.31.29.76:8080')], contextPath: '/${params.BRANCH}-login', onFailure: false, war: '**/*.war' + } + failure { + echo "OMG ! The build failed" + } + } + } + } +} \ No newline at end of file From 10267543871c649adb95820bfb0ead2db86bd48d Mon Sep 17 00:00:00 2001 From: mailrahulsre Date: Wed, 18 Sep 2024 21:00:53 -0400 Subject: [PATCH 49/52] jenkinsfile --- jenkinsfile-dev-b94 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkinsfile-dev-b94 b/jenkinsfile-dev-b94 index 2ea90a0..e9d1599 100644 --- a/jenkinsfile-dev-b94 +++ b/jenkinsfile-dev-b94 @@ -13,7 +13,7 @@ pipeline { stages { stage('fetch the code') { steps { - git branch: 'develop', credentialsId: 'github-cred', url: 'https://github.com/devopscloudsre/java-db-Login.git' + git branch: 'develop1', credentialsId: 'github-cred', url: 'https://github.com/devopscloudsre/java-db-Login.git' } } From 460c318f610596ca9b1e376eef0462377859bf3f Mon Sep 17 00:00:00 2001 From: devopscloudsre <59342234+devopscloudsre@users.noreply.github.com> Date: Tue, 11 Feb 2025 08:24:46 -0500 Subject: [PATCH 50/52] Create maven-publish.yml --- .github/workflows/maven-publish.yml | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/maven-publish.yml diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml new file mode 100644 index 0000000..ac059de --- /dev/null +++ b/.github/workflows/maven-publish.yml @@ -0,0 +1,34 @@ +# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path + +name: Maven Package + +on: + release: + types: [created] + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 11 + uses: actions/setup-java@v4 + with: + java-version: '11' + distribution: 'temurin' + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Build with Maven + run: mvn -B package --file pom.xml + + # - name: Publish to GitHub Packages Apache Maven + # run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml + # env: + # GITHUB_TOKEN: ${{ github.token }} From 76f15340ff31b40c5bb549a55193f50d867e01e2 Mon Sep 17 00:00:00 2001 From: devopscloudsre <59342234+devopscloudsre@users.noreply.github.com> Date: Tue, 11 Feb 2025 08:31:15 -0500 Subject: [PATCH 51/52] Create blank.yml --- .github/workflows/blank.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/blank.yml diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml new file mode 100644 index 0000000..746e72c --- /dev/null +++ b/.github/workflows/blank.yml @@ -0,0 +1,36 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the "master" branch + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v4 + + # Runs a single command using the runners shell + - name: Run a one-line script + run: echo Hello, world! + + # Runs a set of commands using the runners shell + - name: Run a multi-line script + run: | + echo Add other actions to build, + echo test, and deploy your project. From 4f9df72f2eee6f8b0f981ec7b97ddf4b2ec5dd58 Mon Sep 17 00:00:00 2001 From: devopscloudsre <59342234+devopscloudsre@users.noreply.github.com> Date: Tue, 11 Feb 2025 08:36:12 -0500 Subject: [PATCH 52/52] Update maven-publish.yml --- .github/workflows/maven-publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index ac059de..78a6bab 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -6,6 +6,7 @@ name: Maven Package on: release: types: [created] + workflow_dispatch: jobs: build: