From d1ed1fa9c0613207ae290fa7a9c815558c5e1db2 Mon Sep 17 00:00:00 2001 From: Rajat1899 <49920924+Rajat1899@users.noreply.github.com> Date: Wed, 20 Apr 2022 13:00:52 +0530 Subject: [PATCH 1/5] Create Jenkinsfile --- Jenkinsfile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..2ee94aae --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,31 @@ +pipeline { + agent any + stages { + stage('build') { + steps { + echo 'compile maven app' + sh 'mvn compile' + } + } + + stage('test') { + steps { + echo 'test maven app' + sh 'mvn clean test' + } + } + + stage('package') { + steps { + echo 'package maven app' + echo 'adding new line' + sh 'mvn package -DskipTests' + archiveArtifacts '*/*.war' + } + } + + } + tools { + maven 'Maven 3.6.3' + } +} From 403e699a5e36784ec4fb34db2e4129b165e7511e Mon Sep 17 00:00:00 2001 From: Rajat1899 <49920924+Rajat1899@users.noreply.github.com> Date: Sun, 22 May 2022 04:35:22 +0530 Subject: [PATCH 2/5] Add artifact archival step --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2ee94aae..fa82274f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,7 +20,7 @@ pipeline { echo 'package maven app' echo 'adding new line' sh 'mvn package -DskipTests' - archiveArtifacts '*/*.war' + archiveArtifacts 'target/*.war' } } @@ -28,4 +28,4 @@ pipeline { tools { maven 'Maven 3.6.3' } -} +} \ No newline at end of file From 77f9f388390e1071113f6a4f0dea586b391af8aa Mon Sep 17 00:00:00 2001 From: Rajat1899 <49920924+Rajat1899@users.noreply.github.com> Date: Sun, 22 May 2022 04:43:26 +0530 Subject: [PATCH 3/5] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index fa82274f..a120ef2d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,7 +18,7 @@ pipeline { stage('package') { steps { echo 'package maven app' - echo 'adding new line' + echo 'adding new lines' sh 'mvn package -DskipTests' archiveArtifacts 'target/*.war' } @@ -28,4 +28,4 @@ pipeline { tools { maven 'Maven 3.6.3' } -} \ No newline at end of file +} From e066a5c1bdf3ee8ec23fcc9f2cfd9cd572ed3f05 Mon Sep 17 00:00:00 2001 From: Rajat1899 <49920924+Rajat1899@users.noreply.github.com> Date: Sun, 22 May 2022 04:46:09 +0530 Subject: [PATCH 4/5] Added Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a120ef2d..fa82274f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,7 +18,7 @@ pipeline { stage('package') { steps { echo 'package maven app' - echo 'adding new lines' + echo 'adding new line' sh 'mvn package -DskipTests' archiveArtifacts 'target/*.war' } @@ -28,4 +28,4 @@ pipeline { tools { maven 'Maven 3.6.3' } -} +} \ No newline at end of file From c8bfdb1e6376a1a971e04756b7ee1929334836ce Mon Sep 17 00:00:00 2001 From: Rajat1899 <49920924+Rajat1899@users.noreply.github.com> Date: Fri, 29 Sep 2023 11:51:23 +0530 Subject: [PATCH 5/5] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 38a78cde..16f46565 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ This is a Sample Maven App. + +Changed readme content