-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
67 lines (64 loc) · 2.26 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
pipeline {
agent {
label 'dockernode'
}
options {
timestamps()
disableConcurrentBuilds()
ansiColor('xterm')
timeout(time: 20, unit: 'MINUTES') //something is really long if it takes 20 minutes
}
environment {
TZ='America/Denver'
ARTIFACTORY = credentials('frogbuilder-artifactory')
JAVA_HOME ='/usr/local/sdk/.sdkman/candidates/java/17.0.10-tem' //this is for rtMavenRun to do its part on Java17
}
stages {
stage ('Artifactory configuration') {
steps {
rtServer (
id: "ralston-artifactory",
url: 'http://ralston.garyclayburg.com:8081/artifactory',
credentialsId: 'frogbuilder-artifactory'
)
rtMavenDeployer (
id: "MAVEN_DEPLOYER",
serverId: "ralston-artifactory",
releaseRepo: "garyrepo-libs-release-local",
snapshotRepo: "garyrepo-libs-snapshot-local",
excludePatterns: ["com/example*"] //Keep the integration testing modules out of artifactory. We want the test results, not the artifacts.
)
rtMavenResolver (
id: "MAVEN_RESOLVER",
serverId: "ralston-artifactory",
releaseRepo: "garyrepo-libs-release",
snapshotRepo: "garyrepo-libs-snapshot"
)
}
}
stage('main build') {
steps {
rtMavenRun (
//no tool, assume mvn is found on build agent, i.e. sdkman
pom: 'pom.xml',
goals: 'clean javadoc:jar source:jar install',
deployerId: "MAVEN_DEPLOYER",
resolverId: "MAVEN_RESOLVER"
)
sh "./build.sh"
}
}
stage('Publish build info') {
steps {
rtPublishBuildInfo (
serverId: "ralston-artifactory"
)
}
}
}
post {
always {
junit '**/target/**/TEST-*.xml'
}
}
}