docfx icon indicating copy to clipboard operation
docfx copied to clipboard

Making the build fail if there is a warnings in the log

Open bitbonk opened this issue 5 years ago • 3 comments

Operating System: Windows

DocFX Version Used: 2.56.5.0

Template used: custom template

Steps to Reproduce:

  1. Run a build on any CI build server or in a script (e.g. .ps1 or .cmd) where either docfx metadata, docfx build or docfx pdf produces 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.

bitbonk avatar Dec 14 '20 11:12 bitbonk

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.

pascalberger avatar Dec 28 '20 22:12 pascalberger

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

bitbonk avatar Jan 04 '21 18:01 bitbonk

The Warnings Next Generation plugin for Jenkins can parse log files generated by DocFX v2.

KalleOlaviNiemitalo avatar Jan 05 '21 02:01 KalleOlaviNiemitalo