Mark as successful action for builds in Teamcity

佐手、 提交于 2019-12-11 02:25:33

问题


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!


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/49285038/mark-as-successful-action-for-builds-in-teamcity

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!