This is an automated email from the ASF dual-hosted git repository. abesto pushed a commit to branch dont-sign-snapshots in repository https://gitbox.apache.org/repos/asf/incubator-zipkin-brave-karaf.git
commit 21495d30941bb9628cef60fd2f03f048f29e81b1 Author: Zoltán Nagy <[email protected]> AuthorDate: Thu Jan 31 10:42:36 2019 +0000 Jenkinsfile tweaks (#15) * 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 * Remove unneeded poll trigger --- Jenkinsfile | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 50 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f521de9..e21450b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,19 +1,36 @@ +/* + * 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' } - + tools { jdk 'JDK 1.8 (latest)' } options { - buildDiscarder(logRotator(numToKeepStr: '10')) + buildDiscarder(logRotator( + numToKeepStr: '30', + )) timestamps() - } - - triggers { - pollSCM('H/15 * * * *') + skipStagesAfterUnstable() + timeout time: 30, unit: 'MINUTES' } stages { @@ -23,7 +40,7 @@ pipeline { checkout scm } } - + stage('Check environment') { steps { sh 'env' @@ -39,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}>" + ) + } + } + + } } }
