Last active
April 23, 2019 20:58
-
-
Save yorammi/82cfc034ec12218cede4 to your computer and use it in GitHub Desktop.
Groovy PostBuild step code for changing the job build status if certain text appear in the build log ourput
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
errpattern = ~/TEXT-TO-LOOK-FOR-IN-JENKINS-BUILD-OUTPUT.*/; | |
manager.build.logFile.eachLine{ line -> | |
errmatcher=errpattern.matcher(line) | |
if (errmatcher.find()) { | |
manager.build.@result = hudson.model.Result.NEW-STATUS-TO-SET | |
} | |
} |
got the same error.... any idea on how to solve it??
He's using the groovy post build plugin. There manager is predefined for you and you can use it directly.
I am getting this same error and have yet to resolve.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Yorammi,
I got this error:
Any ideas?
Thanks