Not sure about declarative pipeline (I haven't played with them yet). but 
for normal pipeline I use it this way:
bat returnStatus: false, script: "\"${bcad.msbuild_current}\" 
${bcad.msbuild_solution_name} ${bcad.msbuild_default_arg} /t:Build"

You can find the doc here:
https://jenkins.io/doc/pipeline/steps/workflow-durable-task-step/#bat-windows-batch-script

returnStatus can be check or not if you want, if you don't want to end the 
script for warnings like my above example. You can then use msbuild parser 
for example
step([$class: 'WarningsPublisher', canRunOnFailed: true, consoleParsers: [[
parserName: 'MSBuild']]])

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/0e30d94d-ccfc-4b72-b8a8-a7280ee99ce5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to