| Torsten Reinhard: you should be able to replace "manager.logContains()" with
if (currentBuild.rawBuild.log ==~ /(?s).*project allows check:.*\\*\\*\\* NOT \\*\\*\\* allowed.*/) {
Note that this is somewhat different from using "manager.logContains()", as the manager objects internal getMatcher() method matches line after line. Access to getLog() must be approved by an administrator when running in a sandbox. Btw, the usage of "manager" to add badges/summary is deprecated and should be replaced by the badge plug-in: https://jenkins.io/doc/pipeline/steps/badge/ and https://github.com/jenkinsci/badge-plugin/blob/master/README.md Setting the build result without "manager" can be done by using
currentBuild.result = "UNSTABLE"
See pipeline-syntax/globals reference. |