-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJenkinsfile
More file actions
48 lines (47 loc) · 1.54 KB
/
Copy pathJenkinsfile
File metadata and controls
48 lines (47 loc) · 1.54 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
properties([
[$class: 'jenkins.model.BuildDiscarderProperty', strategy: [$class: 'LogRotator', numToKeepStr: '25']],
pipelineTriggers([[$class:"SCMTrigger", scmpoll_spec:"H/30 * * * *"], snapshotDependencies()]),
disableConcurrentBuilds()
])
pipeline {
agent any
tools {
jdk 'jdk11'
}
stages {
stage('Build') {
steps {
withMaven(maven: 'M3.6', mavenSettingsConfig: 'efaps11', mavenLocalRepo: "$WORKSPACE/../../.m2/${env.BRANCH_NAME}") {
sh 'mvn clean install -DskipTests'
}
}
}
stage('Test') {
steps {
withMaven(maven: 'M3.6', mavenSettingsConfig: 'efaps11', mavenLocalRepo: "$WORKSPACE/../../.m2/${env.BRANCH_NAME}",
options: [openTasksPublisher(disabled: true)]) {
sh 'mvn test'
}
}
post {
always {
step([$class: 'Publisher', reportFilenamePattern: '**/testng-results.xml'])
}
}
}
stage('Coverage') {
steps {
withMaven(maven: 'M3.6', mavenSettingsConfig: 'efaps11', mavenLocalRepo: "$WORKSPACE/../../.m2/${env.BRANCH_NAME}",
options: [openTasksPublisher(disabled: true)]) {
sh "mvn clean clover:setup test clover:aggregate clover:clover"
}
step([
$class: 'CloverPublisher',
cloverReportDir: 'target/site',
cloverReportFileName: 'clover.xml',
healthyTarget: [methodCoverage: 5, conditionalCoverage: 5, statementCoverage: 5] // optional, default is: method=70, conditional=80, statement=80
])
}
}
}
}