This is an automated email from the ASF dual-hosted git repository. abesto pushed a commit to branch jenkinsfile-whens in repository https://gitbox.apache.org/repos/asf/incubator-zipkin-website.git
commit 80435ccbb7d51aecbe25dcca7f1d2305720372d9 Author: Zoltan Nagy <[email protected]> AuthorDate: Mon Apr 22 08:25:43 2019 +0100 [Jenkinsfile] Run only on master/PR, publish only from master --- Jenkinsfile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 4068696..0d6a512 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,6 +14,12 @@ pipeline { stages { stage('SCM Checkout') { + when { + anyOf { + branch 'master' + changeRequest target: 'master' + } + } steps { deleteDir() checkout scm @@ -21,6 +27,12 @@ pipeline { } stage('Check environment') { + when { + anyOf { + branch 'master' + changeRequest target: 'master' + } + } steps { sh 'env' sh 'pwd' @@ -33,6 +45,12 @@ pipeline { } stage('Install Jekyll') { + when { + anyOf { + branch 'master' + changeRequest target: 'master' + } + } steps { sh ''' . "${rvm_path}/scripts/rvm" @@ -44,6 +62,12 @@ pipeline { } stage('Build site') { + when { + anyOf { + branch 'master' + changeRequest target: 'master' + } + } steps { sh ''' . "${rvm_path}/scripts/rvm" @@ -55,6 +79,9 @@ pipeline { } stage('Publish') { + when { + branch 'master' + } steps { sh ''' set -xeuo pipefail
