Last active
February 18, 2018 01:41
-
-
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).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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