Enno
Enno

Reputation: 1862

TeamCity fails to publish artifacts, but build goes green?

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?

Upvotes: 5

Views: 3023

Answers (2)

kwesolowski
kwesolowski

Reputation: 724

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

Artifacts path .+ not found

Upvotes: 2

Biswajit_86
Biswajit_86

Reputation: 3739

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

Upvotes: 0

Related Questions