Skip to content

Instantly share code, notes, and snippets.

@djfdyuruiry
Last active February 18, 2018 01:41
Show Gist options
  • Save djfdyuruiry/4a27564614146ed17ea5206ce0dff8de to your computer and use it in GitHub Desktop.
Save djfdyuruiry/4a27564614146ed17ea5206ce0dff8de to your computer and use it in GitHub Desktop.
Jenkins pipeline that builds on merge to master; useful for Multi-Branch Pipelines where you only want master code to be auto built (feature branches are then manually triggered during development).
if (env.BRANCH_NAME == "master") {
properties([
pipelineTriggers([
pollSCM("H/5 * * * *")
])
])
}
pipeline {
agent none
stages {
stage("greet the general") {
steps {
echo "hello there"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment