This commit is contained in:
Venkatesh 2022-10-06 13:04:51 +05:30
parent c7bdd67dbd
commit dc9c77b09c

View file

@ -1,23 +1,17 @@
pipeline { pipeline {
agent { label 'JDK-11' } agent { label 'JAVA-11' }
triggers { pollSCM('* * * * *') }
parameters {
string(name: 'MAVEN_GOAL', defaultValue: 'mvn package', description: 'enter maven goal')
choice(name: 'BRANCH', choices: ['master', 'main', 'three'], description: 'select one')
}
stages { stages {
stage('clone') { stage('clone') {
steps { steps {
git url: 'https://github.com/GUDAPATIVENKATESH/spring-petclinic.git', git branch: 'main', url: 'https://github.com/GUDAPATIVENKATESH/spring-petclinic.git'
branch: '${params.BRANCH}'
} }
} }
stage('build') { stage('Build') {
steps { steps {
sh '${params.MAVEN_GOAL}' sh 'mvn package'
} }
} }
stage('archive results') { stage('results') {
steps { steps {
junit '**/surefire-reports/*.xml' junit '**/surefire-reports/*.xml'
} }