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' + + } + } + } +}