Combining a build finished trigger and VCS patterns

Hi,

We have the following builds:

  • Master
  • Child A
  • Child B
  • Child C


Master takes approximately 45 minutes and holds a bunch of generated artifacts.  All of the builds use the same VCS (Perforce).  Something like this:

//depot/everything/

where everything contains directories a, b and c.

Our builds are currently set up such that the Child builds are triggered with a Finish Build Trigger pointing to Master.  What we really want though is to combine triggers such that:

  • Child A triggers only when Master completes (successfully of course) AND there have been changes to //depot/everything/a/...
  • Child B triggers only when Master completes (successfully of course) AND there have been changes to //depot/everything/b/...
  • Child C triggers only when Master completes (successfully of course) AND there have been changes to //depot/everything/c/...


The problem is that multiple triggers behave in an OR fashion.  

We are wondering if there is any plan to implement the choice of AND / OR for triggers or if you have a recommended approach for accomplishing this.

Thanks,
Tom

2 comments
Comment actions Permalink

It seems such way of triggering would be served better with help of snapshot dependencies. Moreover it would work more reliable as finish build trigger does not guarantee that A, B and C builds will have artifacts from the correct Master. Consider a case when another Master build has finished successfully while A, B and C are still in the queue. In this case dependent builds can take incorrect artifacts. Such situation is not possible with snapshot dependencies.

Have you tried this approach:
A, B, and C all have snapshot dependency on Master. All builds have VCS triggers enabled, but builds A, B and C have corresponding triggering rules. Snapshot dependency pointing to Master build allows builds reusing to avoid unnecessary Master builds.
?

0
Comment actions Permalink

I had tried snapshot dependencies a few years back and they introduced more problems than they were worth at that time (back in the TC 4 days I think).  However, I have been experimenting with them again and it appears that the issues I had seen back then have been resolved.

Thanks,
Tom

0

Please sign in to leave a comment.