forked from LableOrg/java-maven-junit-helloworld
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile.pipeline
More file actions
35 lines (35 loc) · 783 Bytes
/
Copy pathJenkinsfile.pipeline
File metadata and controls
35 lines (35 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//Just for demo.
pipeline {
agent { docker { image 'maven:3.6.0-jdk-8-alpine' } }
stages {
stage('Git') {
// Get some code from a GitHub repository
steps{
checkout scm
}
}
stage('Build'){
steps{
sh "mvn -Dmaven.test.skip=true clean package"
}
}
stage('Unit Test'){
steps{
sh "mvn -Dmaven.test.failure.ignore clean test"
}
}
stage('Integrational Test'){
steps{
sh "mvn -Dmaven.test.failure.ignore clean install"
}
}
stage('Results') {
//Publish results
steps{
junit '**/target/surefire-reports/TEST-*.xml'
step( [ $class: 'JacocoPublisher' ] )
}
}
//fun comment.
}
}