From 5b414d35506832f3f40b86c18e1d7b09a739c16d Mon Sep 17 00:00:00 2001 From: SameerParmar <50992884+SameerParmar786@users.noreply.github.com> Date: Sun, 17 Jan 2021 12:49:46 -0600 Subject: [PATCH] Create jenkinsfile --- jenkinsfile | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 jenkinsfile diff --git a/jenkinsfile b/jenkinsfile new file mode 100644 index 000000000..2113892a0 --- /dev/null +++ b/jenkinsfile @@ -0,0 +1,41 @@ +pipeline{ + + tools{ + + jdk "myjava" + maven "mymaven" + + } + agent none + stages{ + stage('Checkout'){ + agent any + steps{ + git "https://github.com/edureka-git/DevOpsClassCodes.git" + + } + } + stage('Compile'){ + agent any + steps{ + sh "mvn compile" + } + } + stage('metriccheck'){ + agent any + steps{ + sh "mvn cobertura:cobertura -Dcobertura.report.format=xml" + + } + } + stage('package'){ + agent any + steps{ + sh "mvn package" + } + } + + + + } + }