loop over branches

13 views
Skip to first unread message

jeremy mordkoff

unread,
Dec 1, 2020, 4:10:42 PM12/1/20
to Jenkins Users
We have too many tests, so we have broken them up into three groups. One group that runs after each checkin and one group that runs once a day on any branch with changes and one group that I would like to limit to one instance at a time but still test any active branch. 

What is the best way to structure such a job? I am thinking a daemon type job that just iterates over branches and kicks off the real test job and then waited. The daemon would be sitting idle for almost 6 hours and then busy for 10 seconds, and then idle again, which seems slightly wasteful but at least this way jenkins would be self managing and I could tweak the daemon side to have priorities if I wanted, e.g. if master had changes and hadn't run in 36 hours, run it next, then go back to rotating fairly across the branches with changes. 

I can't have just one long running job that does it all because then my test results would get mixed together (I think) and I would not have red/yellow/blue for each branch. 

Any other ideas? 

Arnaud bourree

unread,
Dec 4, 2020, 2:27:55 PM12/4/20
to jenkins...@googlegroups.com
Hello,

I've setup something similar.
We have one test platform and like you want to run tests on per branch.
I use lock resource plugin to run tests in exclusive stage.

Regards.

Arnaud 

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/bcf0f35d-ed37-4ef6-8445-e628373c7817n%40googlegroups.com.

Jeremy Mordkoff

unread,
Dec 5, 2020, 12:46:42 PM12/5/20
to Jenkins Users
I get that that is a better way of limiting the number of instances than using executor counts. Thanks for that. 

I still don't see a good way to schedule the jobs. Set a cron entry in the job so they all get scheduled once a day and then let all but one sit idle waiting on the resource lock? 
Reply all
Reply to author
Forward
0 new messages