Is it possible to configure the 'message highlight pattern' for the TFS2015.2 build definition command line step?

走远了吗. 提交于 2019-12-10 13:44:45

问题


It is possible to configure the Error message highlight pattern and Warning message highlight pattern of the TFS2015.2 Command Line step?

For example, I may have the following build definition that runs a command line utility, say gulp, to perform some tasks such as code linting.

The precise standard output (via stdout) of this utility would be varied depending on the precise lint tasks being run. For example, one tool for analysing TypeScript code and another tool for analysing Sass code.

Furthermore, the utility may:

  • Write messages to the error stream (via stderr).
  • Return a non-zero exit code.

Neither of the cases above are useful to me because in certain scenarios I don't want TFS to consider the build step has failed. I do however want warnings highlighted in the logs and build summary.

It would be useful to be able to teach the Command Line step about specific output message patterns that represent warnings and errors.

In the build logs for the Command Line step I see this:

This seems to suggest a way to configure the line matching patterns for output that represents warnings and errors. However, I cannot find a way to configure these, hence my question.

I should point out that I'm aware there are other ways of achieving this:

  • One way for example is via a targeted build step that is designed to wrap the command line utility. The built-in Gulp and npm steps for instance, or perhaps a custom authored step / extension.

  • Another way is to emit Logging Commands from a build script as asked here.

My question specifically relates to employing the built-in generic Command Line step directly when these options aren't available or desirable.


回答1:


For now, this can't be achieved by Command Line step directly. You may could ask a feature request in uservoice. The TFS administrator and PM will kindly review it.

UserVoice: https://visualstudio.uservoice.com/forums/330519-team-services/



来源:https://stackoverflow.com/questions/36918603/is-it-possible-to-configure-the-message-highlight-pattern-for-the-tfs2015-2-bu

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