snapshot dependency should only exist for branch




I have a setup with build A, which has a vcs trigger and a build B which is dependant on A. I only want build B to trigger for e.g. the master branch. 

I have specified a branch filter in the trigger for B, but that causes builds to queue up in pending state when A is triggered on other branches. 

Is there a better way to achieve this? 



Comment actions Permalink


First of all, my apologies for the delayed response.
I have just tested this logic on 2020.1; VCS trigger set as per below will correctly respect the branch from dependence configuration:

Could you please confirm the details of your configuration (VCS root settings, trigger settings)?

Comment actions Permalink

Hi, yes my trigger config looks like that except 'trigger on snapshot dependencies' is unchecked.

My build has a snapshot dependency build configured though - so when that one completes, this one runs. but I only want that to happen when the vcs change was on master. At the moment, this build builds up 'pending' changes when non-master changes happen, causing the snapshot dependency to run.

Comment actions Permalink


Thank you for the details! Yes, in this case I suggest to consider enabling this option:

Essentially, with this option on, build will trigger whenever there is a change on the dependency build (A) VCS root which matches the triggering rules and branch filter from VCS trigger set up on the dependant build (B). As with the proposed change the trigger is going to be set up on build (B) you can (and probably should) remove the trigger on build (A), if any. 

Please let me know if this configuration works for you or if there is something else I can check.


Please sign in to leave a comment.