This is an automated email from the ASF dual-hosted git repository. abesto pushed a commit to branch jenkinsfile-tweaks in repository https://gitbox.apache.org/repos/asf/incubator-zipkin-brave-karaf.git
commit abf35a026bdb451306247c879d90578adc93f4f0 Author: Zoltan Nagy <[email protected]> AuthorDate: Thu Jan 31 10:23:14 2019 +0000 [jenkins] Tweaks, e-mail notification * Keep 30 builds instead of 10 * Don't run any stages after tests if tests fail * Time out after 30 minutes * WIP code for releasing snapshots from master * Mail notifications on master build status change --- Jenkinsfile | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 90fa378..8a46e22 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,8 +8,12 @@ pipeline { } options { - buildDiscarder(logRotator(numToKeepStr: '10')) + buildDiscarder(logRotator( + numToKeepStr: '30', + )) timestamps() + skipStagesAfterUnstable() + timeout time: 30, unit: 'MINUTES' } stages { @@ -35,13 +39,38 @@ pipeline { sh './mvnw clean install' } } - } + /* + TODO uncomment and finish up the command here once we're ready to release snapshots + stage('Publish snapshot') { + when { + branch 'master' + } + steps { + sh './mvnw $TODO' + } + } + */ + } post { always { junit '**/target/surefire-reports/*.xml' deleteDir() } + + changed { + script { + if (env.BRANCH_NAME == 'master') { + emailext( + subject: "[${currentBuild.projectName}] master is ${currentBuild.currentResult} (#${currentBuild.number})", + to: '[email protected]', + replyTo: '[email protected]', + body: "See <${currentBuild.absoluteUrl}>" + ) + } + } + + } } }
