How to send a custom message using groovy?

Published: 1/02/2018
How to send a custom message using groovy?
Source: STACKOVERFLOW.COM

I need to read a jenkins build console output and grep a certain portion and send it to slack? Beginnner to groovy. Any help would be appreciated. notifyStarted() //Function to grep the console log def notifyStarted() { def loggg = manager.build.log loggg.split('\n') // Split into lines .dropWhile { !(it ==~ /----*.+/) } // Drop all lines before the text .drop(1) .takeWhile { !(it ==~ /----*.+/

Read more
Related news
Comment