5
votes

After moving a few files to new directories, our main TeamCity build started complaining about a missing artifact path("Artifacts path 'some/path/*.tar.gz' not found"), and dependent builds would fail. In my opinion, dependent builds should not even have been started, because the main build failed - but TeamCity reports those builds as successful (green). This doesn't exactly make finding the problem easier, and I would prefer that the build go red if the artifacts cannot be published. How?

2
The build where the artifacts cannot be found is that in the dependent build or the main build?Kevin Holditch
The dependent build is just a side-show, the root of the problem is my main build configuration: The main build creates a number of artifacts, which are listed in the "Artifact paths" setting of the General settings for that build. one of those paths has changed, and the main build complained that it cannot find the path. So effectively, the list of artifact paths is wrong. My question is why that did not cause the build to fail - it expects an output that was never created, after all?Enno

2 Answers

2
votes

You can add new failure condition when output logs matches regex:

Artifacts path .+ not found
0
votes

This depends on 2 factors

  1. The part of the code which publishes artefacts did not publish a non-zero exit code that teamcity could translate into a build failure. You should probably open up a ticket for them

  2. You can also define your custom build failure conditions in the "Build failure" settings. You can cause the build to fail if artefacts cannot be published