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 49ed69c44543e7200b86e02abb4481d447aceb2f 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 * Add License header to Jenkinsfile --- Jenkinsfile | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 90fa378..e21450b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + pipeline { agent { label 'ubuntu' @@ -8,8 +25,12 @@ pipeline { } options { - buildDiscarder(logRotator(numToKeepStr: '10')) + buildDiscarder(logRotator( + numToKeepStr: '30', + )) timestamps() + skipStagesAfterUnstable() + timeout time: 30, unit: 'MINUTES' } stages { @@ -35,13 +56,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}>" + ) + } + } + + } } }
