-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
58 lines (49 loc) · 1.75 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
#!groovy
//def aServer = Artifactory.server('jfrog')
//def rtMaven = Artifactory.newMavenBuild()
//def buildInfo
pipeline {
agent { node { label 'docker-host' } }
// See https://jenkins.io/doc/book/pipeline/syntax/#options
options {
// See https://support.cloudbees.com/hc/en-us/articles/115000237071-How-do-I-set-discard-old-builds-for-a-Multi-Branch-Pipeline-Job
buildDiscarder(logRotator(numToKeepStr: '30', artifactNumToKeepStr: '30'))
disableConcurrentBuilds()
timeout(time: 10, unit: 'MINUTES')
timestamps()
}
stages {
stage('Init') {
steps {
script { sh '''
echo "PATH: ${PATH}"
echo "M2_HOME: ${M2_HOME}"
''' }
}
}
stage('Build') {
steps {
sh 'mvn install -U -Dmaven.test.failure.ignore=false'
// script {
// rtMaven.resolver server: aServer, releaseRepo: 'my-libs-all', snapshotRepo: 'my-libs-all'
// rtMaven.deployer server: aServer, releaseRepo: 'my-libs', snapshotRepo: 'my-libs'
// rtMaven.tool = 'Default'
// rtMaven.opts = '-Xms64m -Xmx64m -Djson-unit.libraries=gson'
// buildInfo = rtMaven.run pom: 'pom.xml', goals: 'install'
// }
}
post {
always {
junit allowEmptyResults: true, testResults: '*/target/surefire-reports/**.xml'
}
}
}
// stage('Artifactory Publish') {
// steps {
// script {
// aServer.publishBuildInfo buildInfo
// }
// }
// }
}
}