Multibranch pipeline jobs - different jobs on different schedules?

44 views
Skip to first unread message

dcymb...@gmail.com

unread,
Dec 27, 2016, 11:07:24 PM12/27/16
to Jenkins Users

Hi All,

 

This is my first venture into the multibranch pipeline jobs. So far, so good. My maven build completes with just a few environment variable customizations.

 

There are a few additional use cases I have for builds on the same branch, including generating HTML reports from one or two maven modules and running an overnight regression suite that takes about 9 hours to run. They don't have to run in the same workspace. In fact, the regression tests are better in their own workspace.

 

From what I have seen so far, it seems like each branch has just one Jenkinsfile at the job of the branch. I would like to run the other use cases for the same branch on the same machine, but on different schedules:

 

 

*         CI build - poll SCM every 5 minutes, build if there are changes.

 

*         HTML Report - every hour. It could possibly be integrated into the CI build, but that would mess with people's historical expectations.

 

*         Regression tests - every night at 8 pm. I obviously don't want to run this as part of the CI build, since it just takes too long.

 

Is it possible to define these different jobs in a single Jenkinsfile with different schedules, or use multiple Jenkinsfiles, or is there some better solution that would achieve my goal?

 

I am using Jenkins 2.28, Oracle Java 1.8.0_101, Perforce SCM, on CentOS 6.8. I have experience with Groovy, so feel free to respond with language specifics.


I am perhaps answering my own question here, but I suppose I could use Perforce to map a Jenkinsfile in a different directory to the top of the branch for each job. I think that could work, but I still want to know if I can use a more straightforward approach or if there are best practices for different schedules on the same branch.

 

Thanks in advance,

David

Reply all
Reply to author
Forward
0 new messages