-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
44 lines (42 loc) · 1.72 KB
/
Copy pathJenkinsfile
File metadata and controls
44 lines (42 loc) · 1.72 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
// Jenkins must provide the following enviroment variables:
// CLONE_BASE: hostname + base path to the git repository (e.g: https://github.com/example)
// DEV_MAIL : developer address to the mail for faild builds to (e.g: development@example.net)
// Jenkins must provide the following tools
// java-1.8.x : must reference an arbitrary jdk 1.8
pipeline {
agent any
stages {
stage ("Cleanup") {
steps {
timestamps {
deleteDir()
}
}
}
stage ("Checkout") {
steps {
timestamps {
checkout(changelog: false, poll: false, scm: [$class: "GitSCM", branches: [[name: "*/master"]], doGenerateSubmoduleConfigurations: false, extensions: [[$class: "CloneOption", depth: 0, noTags: true, reference: "", shallow: true]], submoduleCfg: [], userRemoteConfigs: [[url: "${env.CLONE_BASE}/subversion.git"]]])
}
}
}
stage ("Build") {
steps {
timestamps {
withMaven(jdk: "java-1.8.x") {
sh("./mvnw --update-snapshots -Dgpg.skip=true -Djarsigner.skip=true clean verify")
}
}
}
post {
always {
jacoco()
junit(allowEmptyResults: true, keepLongStdio: true, testResults: "*/target/failsafe-reports/**/*.xml, */target/surefire-reports/**/*.xml")
}
failure {
mail(body: "See <${env.BUILD_URL}>", subject: "Jenkins build has failed: ${env.JOB_NAME} #${env.BUILD_NUMBER}", to: "${env.DEV_MAIL}")
}
}
}
}
}