mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-25 09:05:50 +00:00
added params to the jenkins file
This commit is contained in:
parent
c134cb9dc4
commit
07a2b55ea9
1 changed files with 6 additions and 2 deletions
|
@ -1,15 +1,19 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'JDK-11' }
|
agent { label 'JDK-11' }
|
||||||
stages {
|
stages {
|
||||||
|
parameters {
|
||||||
|
string(name: 'MAVEN_GOAL', defaultValue: 'mvn package', description: 'enter maven goal')
|
||||||
|
choice(name: 'BRANCH', choices: ['master', 'main', 'three'], description: 'select one')
|
||||||
|
}
|
||||||
stage('clone') {
|
stage('clone') {
|
||||||
steps {
|
steps {
|
||||||
git url: 'https://github.com/GUDAPATIVENKATESH/spring-petclinic.git',
|
git url: 'https://github.com/GUDAPATIVENKATESH/spring-petclinic.git',
|
||||||
branch: 'main'
|
branch: '${params.BRANCH}'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('build') {
|
stage('build') {
|
||||||
steps {
|
steps {
|
||||||
sh 'mvn package'
|
sh '${params.MAVEN_GOAL}'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue