Is it possible to raise and display build warnings from build steps using TFS 2015?
See original GitHub issueBackground
The questions below relate to TFS 2015 on-premise.
It is possible to fail a build step by returning a non-zero exit code from, for example, a PowerShell
or Command Line
step. The build logs also capture anything written to the standard output stream. It is also possible to fail a Command Line
step if anything is written to the standard error stream.
Question 1
Is it possible to raise build warnings via PowerShell
and Command Line
steps so that they’re displayed on the build summary page under Issues
? For example, in the same way that the Visual Studio Build
/ MSBuild
steps are raised and displayed?
Question 2
I notice in the build logs for the Command Line
step the following lines:
2015-09-22T12:29:21.0696320Z Executing the following commandline. (workingFolder = C:\Builds\_work\dacceaf2\Repo)
2015-09-22T12:29:21.0696320Z C:\Builds\_work\dacceaf2\Repo\tools\Test\bin\Release\Test.exe .\src\Web\Content\Images\ C:\Builds\_work\dacceaf2\staging\Web\Content\Images\
2015-09-22T12:29:21.0696320Z Error message highlight pattern:
2015-09-22T12:29:21.0706314Z Warning message highlight pattern:
Is there any way to set these highlight patterns for the step?
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Returning warnings from custom msbuild in TFS
Reference this thread : Is it possible to raise and display build warnings from build steps using TFS 2015? Share. Share a link...
Read more >How to change state of TFS 2015 if build has warnings
I am using TFS 2015 UI to modify a build. I want the TFS build to be in failed state in case any...
Read more >Build Quality Checks - Visual Studio Marketplace
Extension for Azure DevOps - Breaks a build based on quality metrics like number of warnings or code coverage.
Read more >Compiler Warnings by compiler version | Microsoft Learn
The compiler can suppress warnings that were introduced after a version you specify by using the /Wv compiler option. This option is useful...
Read more >Increase Build Log Verbosity to Get More Details About a ...
... build verbosity from within Visual Studio Options. We recommend switching it to normal; this displays errors, warnings, messages with ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@pascalberger OK thanks — tried emitting the output below from a PowerShell step and got the desired result on the build summary page:
Is there currently a generic way of teaching the build system what forms of existing tool output should be considered as warnings though — as per question 2 above?
Additionally are there any built-in generic conventions (other than the logging commands) for triggering a ‘partially succeeded’ step rather than a ‘failed’ step?
I’m happy the logging commands will work for us but they are proprietary — existing build logic will need updating.
You should be able to return warnings and errors from your script using logging commands.