Making the build fail if there is a warnings in the log
Operating System: Windows
DocFX Version Used: 2.56.5.0
Template used: custom template
Steps to Reproduce:
- Run a build on any CI build server or in a script (e.g. .ps1 or .cmd) where either
docfx metadata,docfx buildordocfx pdfproduces at least one warning (e.g. because a a link cannot be resolved).
Expected Behavior: The CI build fails or the script fails or there should be means to make it fail in such a situation.
Actual Behavior: The CI build does not fail and there are no means to make it fail in such a situation.
When using Cake for running DocFx the Cake.Issues.DocFx addin can be used to parse the log file for warnings and break the build afterwards. See here for an example how to use the addin.
I switched from Cake to Nuke a while ago. The same thing will be possible there too once @matkoch and @billhenn have merged https://github.com/nuke-build/nuke/pull/629
The Warnings Next Generation plugin for Jenkins can parse log files generated by DocFX v2.