-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathJenkinsfile
33 lines (29 loc) · 1004 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
node {
def server = Artifactory.server 'ART'
def rtMaven = Artifactory.newMavenBuild()
def buildInfo
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', buildInfo: buildInfo
}
} finally {
// junit 'target/surefire-reports/**/*.xml'
// checkstyle pattern: 'target/checkstyle-result.xml'
// findbugs pattern: 'target/spotbugsXml.xml'
}
if (env.BRANCH_NAME == 'master') {
stage ('Publish build info') {
server.publishBuildInfo buildInfo
}
}
}