From c9aab81e562bd6e431ed14d853514bb07a4bf5a0 Mon Sep 17 00:00:00 2001 From: srinivas0902 <70211094+srinivas0902@users.noreply.github.com> Date: Tue, 6 Feb 2024 14:37:45 +0530 Subject: [PATCH 1/4] Update CICD-pipeline-complete --- CICD-pipeline-complete | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CICD-pipeline-complete b/CICD-pipeline-complete index c9c807f..9cfa57f 100644 --- a/CICD-pipeline-complete +++ b/CICD-pipeline-complete @@ -1,4 +1,4 @@ -new commit for poll scm-- commit on the repo for webhook +New commit for poll scm-- commit on the repo for webhook Complete CICD pipeline go to vim /etc/sudoers From 764f371bda0c1ee511a1ad6d5071a80fabf24cbc Mon Sep 17 00:00:00 2001 From: srinivas0902 <70211094+srinivas0902@users.noreply.github.com> Date: Tue, 6 Feb 2024 17:52:21 +0530 Subject: [PATCH 2/4] Update CICD-pipeline-complete --- CICD-pipeline-complete | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CICD-pipeline-complete b/CICD-pipeline-complete index 9cfa57f..1b87482 100644 --- a/CICD-pipeline-complete +++ b/CICD-pipeline-complete @@ -1,4 +1,4 @@ -New commit for poll scm-- commit on the repo for webhook +New commit for poll scm-- commit on the repo for webhook Complete CICD pipeline go to vim /etc/sudoers From 95b92230f51ef40940f7e7286d9d019d53e42d91 Mon Sep 17 00:00:00 2001 From: srinivas0902 <70211094+srinivas0902@users.noreply.github.com> Date: Tue, 6 Feb 2024 17:57:14 +0530 Subject: [PATCH 3/4] Update CICD-pipeline-complete --- CICD-pipeline-complete | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CICD-pipeline-complete b/CICD-pipeline-complete index 1b87482..9cfa57f 100644 --- a/CICD-pipeline-complete +++ b/CICD-pipeline-complete @@ -1,4 +1,4 @@ -New commit for poll scm-- commit on the repo for webhook +New commit for poll scm-- commit on the repo for webhook Complete CICD pipeline go to vim /etc/sudoers From b33ab8d1e14995162769c55064ce3316716b23f9 Mon Sep 17 00:00:00 2001 From: srinivas0902 <70211094+srinivas0902@users.noreply.github.com> Date: Thu, 8 Feb 2024 13:09:30 +0530 Subject: [PATCH 4/4] Update Jenkinsfile --- Jenkinsfile | 75 +++++++++++++++++++++-------------------------------- 1 file changed, 30 insertions(+), 45 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 47eeba7..b8ab1c4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,50 +1,35 @@ - -pipeline{ +pipeline { + tools{ - maven 'mymaven' } - agent any - stages{ - stage('Checkout the code'){ - - steps{ - echo 'cloning the repo' - git 'https://github.com/Sonal0409/DevOpsClassCodes.git' - } - } - stage('Compile'){ - - steps{ - echo 'complie the code again..' - sh 'mvn compile' - } - } - stage('CodeReview'){ - - steps{ - - echo 'codeReview' - sh 'mvn pmd:pmd' - } - } - stage('UnitTest'){ - - steps{ - - sh 'mvn test' - } - - } + agent any + stages { + stage('Clone a repository'){ + steps { + git 'https://github.com/srinivas0902/DevOpsCodeDemo.git' + } + } + stage('Compile'){ + steps { + sh 'mvn compile' + } + } - stage('Package'){ - - steps{ - - sh 'mvn package' - } - } - - - } + stage('Code Review'){ + steps { + sh 'mvn pmd:pmd' + } + } + stage ('Unit Test'){ + steps { + sh 'mvn test' + } + } + stage ('Build code'){ + steps { + sh 'mvn package' + } + } + } }