mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-27 01:45:49 +00:00
added maven to jenkinsfile
This commit is contained in:
parent
d2b5393292
commit
bf4c9ac964
1 changed files with 22 additions and 1 deletions
23
JenkinsFile
23
JenkinsFile
|
@ -1,9 +1,30 @@
|
||||||
pipeline{
|
pipeline{
|
||||||
agent any
|
agent any
|
||||||
|
|
||||||
|
tools{
|
||||||
|
maven 'maven'
|
||||||
|
jdk 'Java 17'
|
||||||
|
}
|
||||||
|
|
||||||
stages{
|
stages{
|
||||||
stage("build"){
|
stage("build"){
|
||||||
steps{
|
steps{
|
||||||
echo "hello"
|
sh 'mvn -Dmaven.test.failure.ignore=true complie'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage("test"){
|
||||||
|
steps{
|
||||||
|
sh 'mvn -Dmaven.test.failure.ingore=true test'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
success{
|
||||||
|
junit 'target/surefire-reports/**/*.xml'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('package'){
|
||||||
|
steps{
|
||||||
|
sh 'mvn package'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue