0

In TeamCity I have setup a build chain where each environment is dependent upon the builds in the previous environment must be suitable and successful.

However, I would like to fail the build if a suitable build dependency is not found.

The scenario includes a stage gate where a different team is responsible for deployment to production. If they try to deploy a build that doesn't have a suitable dependency, you can configure tc to build or not build the dependency. I would like the build to fail indicating the dependency does not exist.

Sandman
  • 51
  • 1
  • 1
  • 7
  • Here is an option in TeamCity snapshot dependency configuration: "On failed dependency"/"On failed to start/canceled dependency". You can select the value: "Make build failed ti start". Is it what you need? – Alina Mishina Jul 06 '15 at 20:57

1 Answers1

0

Yes , you can use Snapshot dependencies in this scenario.

According to the Teamcity9 documentation for On failed dependency/ On failed to start/canceled dependency, you can do any of the following

  • Run build, but add problem: the dependent build will be run and the problem will be added to it, changing its status to failed (if problem was not muted earlier)
  • Run build, but do not add problem: the dependent build will be run and no problems will be added
  • Make build failed to start: the dependent build will not run and will be marked as "Failed to start"
  • Cancel build: the dependent build will not run and will be marked as "Canceled". Make build failed to start: the dependent build will not run and will be marked as "Failed to start" Cancel build: the dependent build will not run and will be marked as "Canceled".

The 3rd option is what you are looking for

Biswajit_86
  • 3,661
  • 2
  • 22
  • 36