I'm running Jenkins 2 with the Pipeline plugin. I have setup a Multi-branch Pipeline project where each branch (master, develop, etc.) has a Jenkinsfile in the root. Setting this up was simple. However, I'm at a loss for how to have each branch run periodically (not the branch indexing), even when the code does not change. What do I need to put in my Jenkinsfile to enable periodic builds?
Jenkins – “Build Periodically” with a Multi-branch Pipeline in Jenkins
Jenkinsjenkins-pipelinemultibranch-pipeline
Related Topic
- Jenkins – Multi branch pipeline jenkins job with [ci skip]
- Jenkins Multi-Pipeline Build Not Detecting Changes in Repository
- Jenkins – Multi branch Pipeline plugin load multiple jenkinsfile per branch
- Jenkins Pipeline conditional stage succeeds but Jenkins shows build as failed
- Android listview swipe to delete like in gmail app
- Java – Exception in thread “main” java.lang.NoSuchFieldError: TRACE
Best Answer
If you use a declarative style Pipeline and only want to trigger the build on a specific branch you can do something like this:
Found on Jenkins Jira