-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
44 lines (38 loc) · 1.22 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
pipeline {
agent {
label "docker"
}
environment{
def DOCKER_IMAGE = "jenkins-oft-arch-builder"
def DOCKER_REGISTRY = ""
}
stages{
stage("checkout") {
steps{
checkout scm
}
}
stage("build docker") {
steps{
sh "docker build -t ${DOCKER_IMAGE} -f docker/Dockerfile ."
}
}
stage("render html") {
steps {
sh "docker run --rm -v $WORKSPACE:/home/jenkins -v $WORKSPACE/.m2/:/root/.m2/repository ${DOCKER_IMAGE} mvn -B -U clean compile"
archiveArtifacts artifacts: '**/target/*.html,**/target/**/*', fingerprint: true
}
}
stage("render pdf") {
steps {
sh "docker run --rm -v $WORKSPACE:/home/jenkins -v $WORKSPACE/.m2/:/root/.m2/repository ${DOCKER_IMAGE} mvn -B -U compile -P render-pdf"
archiveArtifacts artifacts: '**/target/*.pdf', fingerprint: true
}
}
}
options {
buildDiscarder(logRotator(numToKeepStr:'10'))
timeout(time: 60, unit: 'MINUTES')
disableConcurrentBuilds()
}
}