This repository was archived by the owner on Mar 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
45 lines (45 loc) · 1.39 KB
/
Jenkinsfile
File metadata and controls
45 lines (45 loc) · 1.39 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
44
45
pipeline {
agent any
options {
buildDiscarder(logRotator(artifactDaysToKeepStr: '-1', artifactNumToKeepStr: '10', daysToKeepStr: '-1', numToKeepStr: '10'))
timestamps()
}
tools {
// withMaven ignores tools: https://issues.jenkins-ci.org/browse/JENKINS-43651
maven 'MVN-3'
jdk 'JDK-9'
}
environment {
MAVEN_ARGS = '-e -Dmaven.repo.local=.repository'
}
stages {
stage('Build') {
steps {
withMaven(maven: 'MVN-3', jdk: 'JDK-9', publisherStrategy: 'EXPLICIT', options: [
artifactsPublisher(disabled: false), dependenciesFingerprintPublisher(disabled: false), openTasksPublisher(disabled: false)
]) {
sh "mvn ${MAVEN_ARGS} package -DskipTests"
}
}
}
stage('Verify') {
steps {
withMaven(maven: 'MVN-3', jdk: 'JDK-9', publisherStrategy: 'EXPLICIT', options: [junitPublisher(disabled: false)]) {
sh "mvn ${MAVEN_ARGS} verify"
}
}
}
stage('Build Docs') {
steps {
withMaven(maven: 'MVN-3', jdk: 'JDK-9', publisherStrategy: 'EXPLICIT') {
sh "mvn ${MAVEN_ARGS} site"
}
}
}
}
post {
always {
cleanWs()
}
}
}