Jose
Jose

Reputation: 1471

Mark as successful action for builds in Teamcity

I have a question to all the experienced Teamcity users out there. I would like to exit out of a job based on a particular condition, but I do not want the status of the job as a failure. Is it possible to mark a job as successful even when you exit out of the job with an "exit code 1" or any pointers to achieve the same (exit out of a Teamcity job but mark the job as successful) through an alternative way is greatly appreciated! Thanks!

Upvotes: 2

Views: 1953

Answers (2)

cyberskunk
cyberskunk

Reputation: 1772

You can use TeamCity service messages to update build status, e.g. write to the output

##teamcity[buildStatus status='SUCCESS' text='{build.status.text} and then made green']

to get build status text concatenated with the and then made green string.

Upvotes: 2

Peska
Peska

Reputation: 4140

If you have Command Line Build Step and you are using TeamCity 2017.2 then you can format stderr output as warning. Here is a documentation: https://confluence.jetbrains.com/display/TCD10/Command+Line

Upvotes: 1

Related Questions