Jenkins: Add a global build timeout

Prepares migration to oss.cloudogu.com.
There, we're recognized some builds that hang for hours after some
errors.
This commit is contained in:
Johannes Schnatterer
2018-09-12 18:01:00 +02:00
parent f9a9a94a3f
commit 2c752f9e8b

5
Jenkinsfile vendored
View File

@@ -11,9 +11,11 @@ node() { // No specific label
properties([ properties([
// Keep only the last 10 build to preserve space // Keep only the last 10 build to preserve space
buildDiscarder(logRotator(numToKeepStr: '10')), buildDiscarder(logRotator(numToKeepStr: '10'))
]) ])
timeout(activity: true, time: 20, unit: 'MINUTES') {
catchError { catchError {
Maven mvn = setupMavenBuild() Maven mvn = setupMavenBuild()
@@ -52,6 +54,7 @@ node() { // No specific label
mailIfStatusChanged(commitAuthorEmail) mailIfStatusChanged(commitAuthorEmail)
} }
}
String mainBranch String mainBranch