-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
62 lines (59 loc) · 1.78 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
pipeline {
agent {
docker {
image 'maven:3-jdk-8'
args '-v $HOME/.m2:/var/maven/.m2:z -u 1000 -ti -e _JAVA_OPTIONS=-Duser.home=/var/maven -e MAVEN_CONFIG=/var/maven/.m2'
}
}
options {
buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '15', daysToKeepStr: '90', numToKeepStr: '')
}
stages {
stage('prepare') {
steps {
sh 'git clean -fdx'
}
}
stage('build') {
steps {
sh 'mvn -f iiif-api-model/pom.xml clean install'
recordIssues enabledForFailure: true, aggregatingResults: true, tools: [java(), javaDoc()]
}
}
stage('deployment to maven repository') {
when {
anyOf {
branch 'master'
branch 'develop'
}
}
steps {
sh 'mvn -f iiif-api-model/pom.xml -DskipTests=true deploy'
}
}
}
post {
always {
junit "**/target/surefire-reports/*.xml"
step([
$class : 'JacocoPublisher',
execPattern : 'goobi-viewer-core/target/jacoco.exec',
classPattern : 'goobi-viewer-core/target/classes/',
sourcePattern : 'goobi-viewer-core/src/main/java',
exclusionPattern : '**/*Test.class'
])
}
success {
archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true
}
changed {
emailext(
subject: '${DEFAULT_SUBJECT}',
body: '${DEFAULT_CONTENT}',
recipientProviders: [requestor(),culprits()],
attachLog: true
)
}
}
}
/* vim: set ts=2 sw=2 tw=120 et :*/