From 49fd149d2b8543f82c42c82d19a7be431768d6ae Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Fri, 17 Jan 2025 16:47:36 +0530 Subject: [PATCH 01/25] Update index.jsp --- src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index d7c1c21a..46c6f922 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -23,7 +23,7 @@ - +
From 715a99a7d7335af913e0bd1631027ec1335a5b84 Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Fri, 17 Jan 2025 16:56:51 +0530 Subject: [PATCH 02/25] Update index.jsp --- src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 46c6f922..0ccb5be6 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -23,7 +23,7 @@
- +
From c9e117c60378af4b74628c8e7bdedb04e082bfa9 Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Fri, 17 Jan 2025 17:00:36 +0530 Subject: [PATCH 03/25] Update index.jsp --- src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 0ccb5be6..0abb986c 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -23,7 +23,7 @@
- +
From 9a74e39daed7b0435611f2c5bea6f9fcf8208631 Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Fri, 17 Jan 2025 17:28:14 +0530 Subject: [PATCH 04/25] Update index.jsp --- src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 0abb986c..726a99ea 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -23,7 +23,7 @@
- +
From 51dd6da7750fef5087e46edabe3be94c3cb49847 Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Sat, 18 Jan 2025 23:37:14 +0530 Subject: [PATCH 05/25] Update index.jsp --- src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 726a99ea..2e409019 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -23,7 +23,7 @@
- +
From 90d0fd1e757f975c81360a6b7eac437131162cf5 Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Sat, 18 Jan 2025 23:40:11 +0530 Subject: [PATCH 06/25] Update index.jsp --- src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 2e409019..b1d7ea34 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -23,7 +23,7 @@
- +
From fe59f85d5bfe0d7a7908011c652a374768ff6332 Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Sun, 19 Jan 2025 17:13:19 +0530 Subject: [PATCH 07/25] Update index.jsp --- src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index b1d7ea34..84f85a44 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -23,7 +23,7 @@
- +
From a23715e5e1f80d9004de28aa45bc8b65ae7a7283 Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Sun, 19 Jan 2025 17:14:42 +0530 Subject: [PATCH 08/25] Update index.jsp --- src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 84f85a44..c40e1c7c 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -23,7 +23,7 @@
- +
From 3c460119a29c1f3e5264e86aa46c42687047db64 Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Sun, 19 Jan 2025 17:16:23 +0530 Subject: [PATCH 09/25] Update index.jsp --- src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index c40e1c7c..e3a947e9 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -23,7 +23,7 @@
- +
From 801cfe1d9d5cb592541b6eadcc01f7a41a90711d Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Sun, 19 Jan 2025 17:17:40 +0530 Subject: [PATCH 10/25] Update index.jsp --- src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index e3a947e9..58625a7f 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -23,7 +23,7 @@
- +
From b2649e5c5fb5ec8f1884b108a2bcb684fd585033 Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Sun, 19 Jan 2025 17:44:58 +0530 Subject: [PATCH 11/25] Update index.jsp --- src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 58625a7f..46c6f922 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -23,7 +23,7 @@
- +
From 3abaa094765dd3c26ff5832e22155dd82d10a00f Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Mon, 20 Jan 2025 21:44:05 +0530 Subject: [PATCH 12/25] Update index.jsp --- src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 46c6f922..f41a1baf 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -23,7 +23,7 @@
- +
From 5e2252b6a0327dbf8582ed1e9fb8b559a3ac8eb7 Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Mon, 20 Jan 2025 21:46:47 +0530 Subject: [PATCH 13/25] Update index.jsp --- src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index f41a1baf..0abb986c 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -23,7 +23,7 @@
- +
From 9bbc35cfa333e2f970e50e2ebeb03a5aa3c9db33 Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Wed, 22 Jan 2025 12:13:55 +0530 Subject: [PATCH 14/25] Update index.jsp --- src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 0abb986c..726a99ea 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -23,7 +23,7 @@
- +
From 63902f87ee87595be70dd4b448ee920a9a35e6a2 Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Wed, 22 Jan 2025 12:18:23 +0530 Subject: [PATCH 15/25] Update index.jsp --- src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 726a99ea..2e409019 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -23,7 +23,7 @@
- +
From 6b784a97fc337cb9489e732f0cfada1ca3627f0b Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Wed, 22 Jan 2025 12:21:56 +0530 Subject: [PATCH 16/25] Update index.jsp --- src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 2e409019..132312ca 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -23,7 +23,7 @@
- +
From d2fc7b65f1960836e769e45865399947c11cc482 Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Thu, 23 Jan 2025 15:46:22 +0530 Subject: [PATCH 17/25] Create Jenkinsfile --- Jenkinsfile | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..f1f1d4e5 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,88 @@ +pipeline { + agent { + label 'maven' // Use your Maven server as the agent + } + + environment { + GITHUB_TOKEN = credentials('github-token-id') + } + + stages { + stage('Git Checkout') { + steps { + // This will checkout the code from the correct branch + git url: 'https://github.com/vickeyys/jenkins-java-project-1.git', credentialsId: 'github-token-id' + } + } + + stage('Compile') { + steps { + script { + if (env.BRANCH_NAME == 'prod') { + echo "Compiling for Production" + // Compile with prod profile + sh 'mvn clean compile -P prod' + } else if (env.BRANCH_NAME == 'stag') { + echo "Compiling for Staging" + // Compile with stag profile + sh 'mvn clean compile -P stag' + } else { + echo "No valid environment for branch: ${env.BRANCH_NAME}" + } + } + } + } + + stage('Test') { + steps { + script { + if (env.BRANCH_NAME == 'prod') { + echo "Running tests for Production" + // Test with prod profile + sh 'mvn test -P prod' + } else if (env.BRANCH_NAME == 'stag') { + echo "Running tests for Staging" + // Test with stag profile + sh 'mvn test -P stag' + } else { + echo "No valid environment for branch: ${env.BRANCH_NAME}" + } + } + } + } + + stage('Build') { + steps { + script { + if (env.BRANCH_NAME == 'prod') { + echo "Building for Production" + // Build with prod profile + sh 'mvn package -P prod' + } else if (env.BRANCH_NAME == 'stag') { + echo "Building for Staging" + // Build with stag profile + sh 'mvn package -P stag' + } else { + echo "No valid environment for branch: ${env.BRANCH_NAME}" + } + } + } + } + + stage('Deploy') { + steps { + script { + if (env.BRANCH_NAME == 'prod') { + echo "Deploying to Production" + // Add your production deployment steps here + } else if (env.BRANCH_NAME == 'stag') { + echo "Deploying to Staging" + // Add your staging deployment steps here + } else { + echo "Branch ${env.BRANCH_NAME} is not recognized" + } + } + } + } + } +} From 46d4da8bc0ad8ea14ff60cf0cd951e955f4c2c1e Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Thu, 23 Jan 2025 16:07:58 +0530 Subject: [PATCH 18/25] Update index.jsp --- src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 132312ca..409b5a32 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -23,7 +23,7 @@
- +
From 7579d2efcca83da547e2a672b17865a9045ebf67 Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Thu, 23 Jan 2025 16:13:58 +0530 Subject: [PATCH 19/25] Update index.jsp --- src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 409b5a32..0abb986c 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -23,7 +23,7 @@
- +
From da2806d3c0cdb3b95a578b8e500f8f85a83dea7c Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Thu, 23 Jan 2025 16:31:14 +0530 Subject: [PATCH 20/25] Update pom.xml --- pom.xml | 119 ++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 72 insertions(+), 47 deletions(-) diff --git a/pom.xml b/pom.xml index 01e0d5a2..d553e4aa 100644 --- a/pom.xml +++ b/pom.xml @@ -1,51 +1,76 @@ - 4.0.0 - in.RAHAM - NETFLIX - war - 1.2.2 - Java Home myweb - http://maven.apache.org - - - kammana - - - - com.oracle.bedrock - bedrock-runtime-maven - 5.1.2 - - - - junit - junit - 3.8.1 - test - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + in.RAHAM + NETFLIX + war + 1.2.2 + Java Home myweb + http://maven.apache.org + + + kammana + + + + + com.oracle.bedrock + bedrock-runtime-maven + 5.1.2 + + + + junit + junit + 3.8.1 + test + + + + + + nexusRepo + http://13.233.230.166:8081/repository/maven-snapshots/ + + + + nexusRepo + http://13.233.230.166:8081/repository/maven-releases/ + + + + + + maven1 + Maven.org + http://repo1.maven.org/maven2 + + - - - - - nexusRepo - http://13.233.230.166:8081/repository/maven-snapshots/ - - - - nexusRepo - http://13.233.230.166:8081/repository/maven-releases/ - - - - - - maven1 - Maven.org - http://repo1.maven.org/maven2 - - + + + + + stag + + staging + ${project.build.directory}/stag + + + NETFLIX-stag + + - + + + prod + + production + ${project.build.directory}/prod + + + NETFLIX-prod + + + From 8b1977b3894e7095c47f13954e7e302f4f31ffd4 Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Thu, 23 Jan 2025 16:40:14 +0530 Subject: [PATCH 21/25] Update index.jsp --- src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 0abb986c..c8a69378 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -23,7 +23,7 @@
- +
From aac462c63895baa18d42fc4b5a4bef4038d31e8e Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Thu, 23 Jan 2025 16:43:02 +0530 Subject: [PATCH 22/25] Delete Jenkinsfile --- Jenkinsfile | 88 ----------------------------------------------------- 1 file changed, 88 deletions(-) delete mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index f1f1d4e5..00000000 --- a/Jenkinsfile +++ /dev/null @@ -1,88 +0,0 @@ -pipeline { - agent { - label 'maven' // Use your Maven server as the agent - } - - environment { - GITHUB_TOKEN = credentials('github-token-id') - } - - stages { - stage('Git Checkout') { - steps { - // This will checkout the code from the correct branch - git url: 'https://github.com/vickeyys/jenkins-java-project-1.git', credentialsId: 'github-token-id' - } - } - - stage('Compile') { - steps { - script { - if (env.BRANCH_NAME == 'prod') { - echo "Compiling for Production" - // Compile with prod profile - sh 'mvn clean compile -P prod' - } else if (env.BRANCH_NAME == 'stag') { - echo "Compiling for Staging" - // Compile with stag profile - sh 'mvn clean compile -P stag' - } else { - echo "No valid environment for branch: ${env.BRANCH_NAME}" - } - } - } - } - - stage('Test') { - steps { - script { - if (env.BRANCH_NAME == 'prod') { - echo "Running tests for Production" - // Test with prod profile - sh 'mvn test -P prod' - } else if (env.BRANCH_NAME == 'stag') { - echo "Running tests for Staging" - // Test with stag profile - sh 'mvn test -P stag' - } else { - echo "No valid environment for branch: ${env.BRANCH_NAME}" - } - } - } - } - - stage('Build') { - steps { - script { - if (env.BRANCH_NAME == 'prod') { - echo "Building for Production" - // Build with prod profile - sh 'mvn package -P prod' - } else if (env.BRANCH_NAME == 'stag') { - echo "Building for Staging" - // Build with stag profile - sh 'mvn package -P stag' - } else { - echo "No valid environment for branch: ${env.BRANCH_NAME}" - } - } - } - } - - stage('Deploy') { - steps { - script { - if (env.BRANCH_NAME == 'prod') { - echo "Deploying to Production" - // Add your production deployment steps here - } else if (env.BRANCH_NAME == 'stag') { - echo "Deploying to Staging" - // Add your staging deployment steps here - } else { - echo "Branch ${env.BRANCH_NAME} is not recognized" - } - } - } - } - } -} From 94c4f511044dac7a9e198958be9658d955817cc5 Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Thu, 23 Jan 2025 16:46:09 +0530 Subject: [PATCH 23/25] Update index.jsp --- src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index c8a69378..132312ca 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -23,7 +23,7 @@
- +
From f6fad7a6141229c3485120819a9938a28e04430c Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Fri, 24 Jan 2025 11:50:22 +0530 Subject: [PATCH 24/25] Create Jenkinsfile --- Jenkinsfile | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..f1f1d4e5 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,88 @@ +pipeline { + agent { + label 'maven' // Use your Maven server as the agent + } + + environment { + GITHUB_TOKEN = credentials('github-token-id') + } + + stages { + stage('Git Checkout') { + steps { + // This will checkout the code from the correct branch + git url: 'https://github.com/vickeyys/jenkins-java-project-1.git', credentialsId: 'github-token-id' + } + } + + stage('Compile') { + steps { + script { + if (env.BRANCH_NAME == 'prod') { + echo "Compiling for Production" + // Compile with prod profile + sh 'mvn clean compile -P prod' + } else if (env.BRANCH_NAME == 'stag') { + echo "Compiling for Staging" + // Compile with stag profile + sh 'mvn clean compile -P stag' + } else { + echo "No valid environment for branch: ${env.BRANCH_NAME}" + } + } + } + } + + stage('Test') { + steps { + script { + if (env.BRANCH_NAME == 'prod') { + echo "Running tests for Production" + // Test with prod profile + sh 'mvn test -P prod' + } else if (env.BRANCH_NAME == 'stag') { + echo "Running tests for Staging" + // Test with stag profile + sh 'mvn test -P stag' + } else { + echo "No valid environment for branch: ${env.BRANCH_NAME}" + } + } + } + } + + stage('Build') { + steps { + script { + if (env.BRANCH_NAME == 'prod') { + echo "Building for Production" + // Build with prod profile + sh 'mvn package -P prod' + } else if (env.BRANCH_NAME == 'stag') { + echo "Building for Staging" + // Build with stag profile + sh 'mvn package -P stag' + } else { + echo "No valid environment for branch: ${env.BRANCH_NAME}" + } + } + } + } + + stage('Deploy') { + steps { + script { + if (env.BRANCH_NAME == 'prod') { + echo "Deploying to Production" + // Add your production deployment steps here + } else if (env.BRANCH_NAME == 'stag') { + echo "Deploying to Staging" + // Add your staging deployment steps here + } else { + echo "Branch ${env.BRANCH_NAME} is not recognized" + } + } + } + } + } +} From c6ce7e1e60d7605dcf256d6841674f0627f45acb Mon Sep 17 00:00:00 2001 From: vickeyys <159456389+vickeyys@users.noreply.github.com> Date: Fri, 24 Jan 2025 12:38:53 +0530 Subject: [PATCH 25/25] Update index.jsp --- src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 132312ca..409b5a32 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -23,7 +23,7 @@
- +