From 937c2ac65f5f24710b0fa7c47e84c752d35e0442 Mon Sep 17 00:00:00 2001 From: NAMAN__AMRIT_ARJUN <62653226+6829nkhpas@users.noreply.github.com> Date: Tue, 26 Aug 2025 11:31:38 +0530 Subject: [PATCH 1/4] Create change.txt challanling the trigor --- change.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 change.txt diff --git a/change.txt b/change.txt new file mode 100644 index 0000000..ef3bcfc --- /dev/null +++ b/change.txt @@ -0,0 +1 @@ +change and trigger the buid trigger From e799941fcdafa19ac49de11467c8a1d696300be0 Mon Sep 17 00:00:00 2001 From: NAMAN__AMRIT_ARJUN <62653226+6829nkhpas@users.noreply.github.com> Date: Tue, 26 Aug 2025 13:49:36 +0530 Subject: [PATCH 2/4] Create Jenkinsfile pipe line as code in groovy --- Jenkinsfile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..2fab8f7 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,35 @@ +pipeline { + agent any + tools{ + maven 'maven 3.9.6' + } + stages{ + stage("build"){ + steps{ + echo 'complile the sysgoo app ....' + sh 'mvn compile' + + } + } + stage("two"){ + steps{ + echo 'Running the tests ...' + sh 'mvn clean test' + } + } + stage("three"){ + steps{ + echo 'Packaging the app ...' + sh 'mvn package -DskipTests' + } + } + } + + post{ + always{ + echo 'This pipeline is completed..' + } + } +} +@6829nkhpas +Comment From e186fdb5ef61c9155e3cb638d12e3030d50addf9 Mon Sep 17 00:00:00 2001 From: NAMAN__AMRIT_ARJUN <62653226+6829nkhpas@users.noreply.github.com> Date: Tue, 26 Aug 2025 15:01:35 +0530 Subject: [PATCH 3/4] Update Jenkinsfile mistakes --- Jenkinsfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2fab8f7..6129dd3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -31,5 +31,4 @@ pipeline { } } } -@6829nkhpas -Comment + From 472046c198aaf7205bbf9ece31ad86fc252d2942 Mon Sep 17 00:00:00 2001 From: NAMAN__AMRIT_ARJUN <62653226+6829nkhpas@users.noreply.github.com> Date: Wed, 27 Aug 2025 18:34:14 +0530 Subject: [PATCH 4/4] use per stage docker agent --- Jenkinsfile | 71 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 26 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6129dd3..a87f0cf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,34 +1,53 @@ pipeline { - agent any - tools{ - maven 'maven 3.9.6' - } - stages{ - stage("build"){ - steps{ - echo 'complile the sysgoo app ....' - sh 'mvn compile' - - } + agent none + stages { + stage('build') { + agent { + docker { + image 'maven:3.9.6-eclipse-temurin-17-alpine' + } + } - stage("two"){ - steps{ - echo 'Running the tests ...' - sh 'mvn clean test' - } + steps { + echo 'complile the sysgoo app ....' + sh 'mvn compile' } - stage("three"){ - steps{ - echo 'Packaging the app ...' - sh 'mvn package -DskipTests' - } + } + + stage('two') { + agent { + docker { + image 'maven:3.9.6-eclipse-temurin-17-alpine' + } + } - } + steps { + echo 'Running the tests ...' + sh 'mvn clean test' + } + } - post{ - always{ - echo 'This pipeline is completed..' + stage('three') { + agent { + docker { + image 'maven:3.9.6-eclipse-temurin-17-alpine' + } + + } + steps { + echo 'Packaging the app ...' + sh 'mvn package -DskipTests' + } } + } -} + tools { + maven 'maven 3.9.6' + } + post { + always { + echo 'This pipeline is completed..' + } + } +} \ No newline at end of file