When dependency fails, how to avoid running a build?

Hi,

 

Using TC 2017.1.5

I have two build definitions: Build and Deploy. Deploy triggers on VCS changes using snapshot dependency from Build. When Build fails, Deploy also fails. But what I'd really want, is for Deploy not to start/run at all. In the snapshot dependency options, I do not see a "Do not run build" option when a dependency fails. I do not want it to run - and I do not want it to be marked as failed.

Is that possible?

 

0
2 comments
Avatar
Permanently deleted user

In the build's overview page, there's a checkbox 'Show canceled and failed to start builds'.  You can hide builds that didn't start because you configured them not to when a snapshot dependency isn't satisfied with this option.

 

To be clear, this is effective if your build's snapshot dependency has the "on failed dependency" option set to "make build failed to start".

 

-Rob

0

Hi Werner,

If you have the snapshot dependency set and the trigger on deploy, then getting it to be marked as failed to start is the best you can get. You can, as Rob mentioned, hide those builds if you don't want to see them. Being marked as failed to start should not be consuming almost any resources, as most tasks would happen after this mark happens.

This said, if you still want to not start it at all, you can, instead, move the trigger to build (leave the snapshot dependency), and use a finish build trigger to launch Deploy and mark "Trigger only on successful build". While we often don't recommend this, as it hides the status of the full deployment chain, if you are ok with having it that way, it might be an option for you.

0

Please sign in to leave a comment.