Update Jenkinsfile
This commit is contained in:
parent
b266e7cb1f
commit
ea713df31a
1 changed files with 32 additions and 0 deletions
32
Jenkinsfile
vendored
32
Jenkinsfile
vendored
|
|
@ -0,0 +1,32 @@
|
|||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
stage('Echo Version') {
|
||||
steps {
|
||||
sh 'echo Print Maven Version'
|
||||
sh 'mvn -version '
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh 'mvn clean package -DskipTests=true'
|
||||
archiveArtifacts 'target/hello-demo-*.jar'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Unit Test') {
|
||||
steps {
|
||||
script {
|
||||
sh "mvn test"
|
||||
}
|
||||
|
||||
junit(testResults: 'target/surefire-reports/TEST-*.xml', keepProperties: true, keepTestNames: true)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
tools {
|
||||
maven 'M398'
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue