Created
January 23, 2013 07:14
-
-
Save gilgamez/4602785 to your computer and use it in GitHub Desktop.
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
def workspace = manager.build.workspace | |
def matcher = manager.getLogMatcher(".*Messages transferred +: (\\d+).*") | |
def writeToCsv(csv, text) { | |
csv.act({f,c->f.withWriterAppend("UTF-8") { it.write(text + "\n") }} as hudson.FilePath.FileCallable<Void>) | |
} | |
if(matcher?.matches()) { | |
def result = matcher.group(1) | |
def csv = workspace.child("messages_transferred.csv") | |
if (!csv.exists()) {writeToCsv(csv, "transferred")} | |
writeToCsv(csv, matcher.group(1)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment