Dependent builds in chain using independent builds from different branches

Our company has a build chain (actually several) that builds and deploys based on two different branches (Dev and QA, e.g.).

I want the dependent builds to only use independent builds that used the same branch.  For example, if I have a QA branch, I want the Build and Deploy steps in the chain to both use the QA branch.

I can achieve this, but only with the following settings on the snapshot dependency.

If I check "Do not run new build if there is a suitable one", then the Deploy step will sometimes deploy a Build from a different branch.

It seems like "suitable" includes builds in the chain from a different branch.

If I leave the settings above, the Deploy always uses the correct branch, but it also always rebuilds the Build build, even if the Build build just finished running.  That's wasteful of my build credits and also takes extra time, and increments the build number unnecessarily (though that's not a big deal).

Are there settings that will ensure that "suitable" builds include only builds that used the same branch as the dependent Deploy build?

Thanks,

Peter

 

Please sign in to leave a comment.