Tune Jenkins pipeline: skip tests on deploy, retry, notification when fixed
diff --git a/Jenkinsfile b/Jenkinsfile
index 2177c4e..3f5f7bd 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -19,7 +19,7 @@
pipeline {
agent none
options {
- buildDiscarder(logRotator(numToKeepStr: '3'))
+ buildDiscarder(logRotator(numToKeepStr: '10'))
timeout(time: 8, unit: 'HOURS')
}
triggers {
@@ -30,6 +30,7 @@
stage ('Debug') {
options {
timeout(time: 1, unit: 'HOURS')
+ retry(1)
}
agent {
docker {
@@ -51,7 +52,8 @@
parallel {
stage ('Linux Java 8') {
options {
- timeout(time: 2, unit: 'HOURS')
+ timeout(time: 4, unit: 'HOURS')
+ retry(1)
}
agent {
docker {
@@ -72,7 +74,8 @@
}
stage ('Linux Java 11') {
options {
- timeout(time: 2, unit: 'HOURS')
+ timeout(time: 4, unit: 'HOURS')
+ retry(1)
}
agent {
docker {
@@ -92,7 +95,8 @@
}
stage ('Linux Java 12') {
options {
- timeout(time: 2, unit: 'HOURS')
+ timeout(time: 4, unit: 'HOURS')
+ retry(1)
}
agent {
docker {
@@ -112,7 +116,8 @@
}
stage ('Windows Java 8') {
options {
- timeout(time: 2, unit: 'HOURS')
+ timeout(time: 4, unit: 'HOURS')
+ retry(1)
}
agent {
label 'Windows'
@@ -135,6 +140,7 @@
stage ('Deploy') {
options {
timeout(time: 2, unit: 'HOURS')
+ retry(1)
}
agent {
label 'ubuntu'
@@ -145,7 +151,7 @@
sh '''
export JAVA_HOME=/home/jenkins/tools/java/latest1.8
export MAVEN_OPTS="-Xmx512m"
- /home/jenkins/tools/maven/latest3/bin/mvn -V clean install source:jar deploy
+ /home/jenkins/tools/maven/latest3/bin/mvn -V clean deploy -DskipTests
'''
}
post {
@@ -161,6 +167,11 @@
subject: "Jenkins pipeline failed: ${currentBuild.fullDisplayName}",
body: "Jenkins build URL: ${env.BUILD_URL}"
}
+ fixed {
+ mail to: 'notifications@directory.apache.org',
+ subject: "Jenkins pipeline fixed: ${currentBuild.fullDisplayName}",
+ body: "Jenkins build URL: ${env.BUILD_URL}"
+ }
}
}