-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathJenkinsfile
More file actions
43 lines (38 loc) · 1.28 KB
/
Jenkinsfile
File metadata and controls
43 lines (38 loc) · 1.28 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
node {
def server = Artifactory.server 'ART'
def rtMaven = Artifactory.newMavenBuild()
def buildInfo
def oldWarnings
stage ('Clone') {
checkout scm
}
stage ('Artifactory configuration') {
rtMaven.tool = 'M3'
rtMaven.deployer releaseRepo: 'libs-release-local', snapshotRepo: 'libs-snapshot-local', server: server
rtMaven.resolver releaseRepo: 'libs-release', snapshotRepo: 'libs-snapshot', server: server
buildInfo = Artifactory.newBuildInfo()
buildInfo.env.capture = true
}
try{
stage ('Exec Maven') {
rtMaven.run pom: 'pom.xml', goals: 'clean install -P dev', buildInfo: buildInfo
}
} finally {
junit '**/surefire-reports/**/*.xml'
recordIssues tool: checkStyle(pattern: '**/target/checkstyle-result.xml')
recordIssues tool: spotBugs(pattern: '**/target/spotbugsXml.xml')
publishHTML (target: [
allowMissing: true,
alwaysLinkToLastBuild: true,
keepAll: true,
reportDir: 'target/site/jacoco',
reportFiles: 'index.html',
reportName: "JaCoCo report"
])
}
if (env.BRANCH_NAME == 'dev') {
stage ('Publish build info') {
server.publishBuildInfo buildInfo
}
}
}