-
Notifications
You must be signed in to change notification settings - Fork 15
/
Jenkinsfile
34 lines (32 loc) · 958 Bytes
/
Jenkinsfile
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
pipeline {
agent any
tools {
jdk 'jdk8'
maven 'maven3'
}
stages {
stage('install and sonar parallel') {
steps {
parallel(
install: {
sh "mvn -U clean test cobertura:cobertura -Dcobertura.report.format=xml"
},
sonar: {
sh "mvn sonar:sonar -Dsonar.host.url=${env.SONARQUBE_HOST}"
}
)
}
post {
always {
junit '**/target/*-reports/TEST-*.xml'
step([$class: 'CoberturaPublisher', coberturaReportFile: 'target/site/cobertura/coverage.xml'])
}
}
}
stage('deploy') {
steps {
sh "mvn deploy -DskipTests -Dartifactory_url=${env.ARTIFACTORY_URL}"
}
}
}
}