Reg scanning for all branches in Multi branch pipeline

44 views
Skip to first unread message

Satish Lvr

unread,
Aug 22, 2018, 8:42:00 AM8/22/18
to Jenkins Users
Hi,

Greetings !

We are currently using Bitbucket + Jenkins. In our Bitbucket repo, we have around ~450 branches due to some old reasons.
When we raise any Pull request, Jenkins automatically scanning all 450 branches which is taking time to finish build for Pull Request. This is happening for all pull requests created.
Is there any way to avoid to not scan for the branches which we don't want or which are not active ? Or can we add any rule like scan only branches which has Jenkinsfile. Most of the branches do not have Jenkinsfile.

Regards
Satish.

Jan Monterrubio

unread,
Aug 22, 2018, 8:56:47 PM8/22/18
to jenkins...@googlegroups.com



>  Or can we add any rule like scan only branches which has Jenkinsfile

How would it know what branches have a jenkins file without scanning them all? 

Follow up question, why 450 branches? Are they all active or can some of them be removed?

--
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/23844211-599b-4cac-a239-f3bec3b58aac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Satish Lvr

unread,
Aug 23, 2018, 7:55:25 AM8/23/18
to Jenkins Users
Hi Jan,

Thanks for reply.

How would it know what branches have a jenkins file without scanning them all?
-->> Exactly. For the first scan, I am fine with that. But for each PR, does it require to scan as my PR is targeted to specific branch.?

Follow up question, why 450 branches? Are they all active or can some of them be removed?
-->> Definitely, there is a plan to clean up but needs some time. So checking how to optimize the build time mean time.

Regards
Satish.

Satish Lvr

unread,
Aug 23, 2018, 7:55:44 AM8/23/18
to jenkins...@googlegroups.com
Hi Jan,

Thank you for the reply.

How would it know what branches have a jenkins file without scanning them all?  
-->> Yeah, it should scan to know initially. But in our case, for each PR targeted to specific branch also, it is scanning all branches. Can we avoid it ?
 
Follow up question, why 450 branches? Are they all active or can some of them be removed? 
-->> Definitely, we need to clean up the branches and it is our plan which will take some time. So mean time, we are checking to optimize the build time where we found that scan is taking much time as branches are large in number.

Regards
Satish. 

Reply all
Reply to author
Forward
0 new messages