Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Triggering build based on changes to any branch #2947

simo.kurra ·
Hi,

I wonder if someone has ideas how to correctly implement the following workflow:

In a git repository we can have numerous branches, developers create a branch in some cases for each change, for one feature, for some experimental thing...

Now we would like to implement a config in QB that launches a build when ever any of these branches has changes committed to it (or new branches are created), from that specific branch.

We managed to get this kind working by the repository with wildcards, but this approach is highly inefficient. Every time the scheduler runs, it creates a number of jobs in the queue equaling the number of branches (which constantly grows and grows) for just running the build condition check.

So I wonder if there is a way to achieve "if changes found in the entire repository, give me the branch where the changes are and launch a build" in one job?

Branches are extremely cheap and convenient in git, but we are having a little trouble bridging this into Quickbuild so resorting to seeking the advice of wiser users <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
  • replies 5
  • views 2880
  • stars 0
robinshen ADMIN ·
Unfortunately for now this is the only approach doing this.
simo.kurra ·
Hi,

Ok, are there any plans for changing it? I'm thinking the git plugin could do all this internally without spawning all these jobs. It's so far kind of a corner case for us, but I could see value for developers in this. But with the current implementation we would not be able to sustain this if more users started doing it.

Possibly we can work around it too by creating some sort of gating config that does these checks with scripting / command line and then triggers the appropriate branch, but before resorting to that it would be cool to know if there is hope of one day having this out of the box.
robinshen ADMIN ·
So the problem here is that the build condition checking job piles more and more in the queue even if there are no changes in the branch?
simo.kurra ·
Exactly yes, each time the condition check runs we get N jobs in the queue (N=number of branches) for every config that this is set to. Currently we have only one such config but it's already creating problems performance wise. With concurrent:yes they are digested in reasonable time but hog then N build resources for the duration, with concurrency:no it takes a very long time to digest them all.
robinshen ADMIN ·
I filed an improvement request for this at:
http://track.pmease.com/browse/QB-2176
Please watch this issue to get notified when the issue is solved.