From a674260adbdee5530867921bb30110e9288d5845 Mon Sep 17 00:00:00 2001 From: mnforba <88167119+mnforba@users.noreply.github.com> Date: Sun, 29 Aug 2021 15:09:32 -0400 Subject: [PATCH] Create jenkinsfile --- jenkinsfile | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 jenkinsfile diff --git a/jenkinsfile b/jenkinsfile new file mode 100644 index 000000000..c891da630 --- /dev/null +++ b/jenkinsfile @@ -0,0 +1,55 @@ +pipeline { + agent any + + tools { + jdk 'myjava' + // Install the Maven version configured as "M3" and add it to the path. + maven 'mymaven' + } + + stages { + stage('Checkout') { + steps { + // Get some code from a GitHub repository + git 'https://github.com/edureka-git/DevOpsClassCodes.git' + + } + } + + stage('Compile') { + steps { + // Get some code from a GitHub repository + sh 'mvn compile' + + } + } + stage('CodeReview') { + steps { + // Get some code from a GitHub repository + sh 'mvn pmd:pmd' + + } + } + stage('UnitTest') { + steps { + // Get some code from a GitHub repository + sh 'mvn test' + + } + } + stage('MatricCheck') { + steps { + // Get some code from a GitHub repository + sh 'mvn cobertura:cobertura -Dcobertura.report.format=xml' + + } + } + stage('Package') { + steps { + // Get some code from a GitHub repository + sh 'mvn package' + + } + } + } +}