2

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!

Jose
  • 1,333
  • 5
  • 20
  • 38

2 Answers2

2

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.

cyberskunk
  • 1,722
  • 20
  • 22
1

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

Peska
  • 3,980
  • 3
  • 23
  • 40