-
Notifications
You must be signed in to change notification settings - Fork 7
/
Jenkinsfile
38 lines (27 loc) · 907 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
35
36
37
38
@Library('ICANN_LIB') _
properties([[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '7', artifactNumToKeepStr: '8', daysToKeepStr: '7', numToKeepStr: '8']],])
node('docker') {
def utils = new icann.Utilities()
try{
utils.notifyBuild("STARTED", 'jenkinsjobs')
stage ('Checkout on Slave'){
checkout scm
}
stage ('Run Tests'){
if( "${env.BRANCH_NAME}" == 'master'){
utils.mvn(args: 'clean deploy', jdkVersion: 'jdk11', publishArtifacts: true)
}
else{
utils.mvn(args: 'clean test', jdkVersion: 'jdk11')
}
}
}
catch (e) {
currentBuild.result = "FAILED"
throw e
}
finally{
step([$class: 'Publisher'])
utils.notifyBuild(currentBuild.result, 'jenkinsjobs')
}
}