Daniel, I believe your best bet is the script itself. I had a similar problem , and I came up with a three-line solution myself without any experience with Java / Groovy.
First of all, you need a way to determine that the assembly failed. See My problem for a solution.
Secondly, you need to keep the number of failed collections somewhere. The file in the project workspace is the obvious place. Use this snippet as a base:
def f = new File(manager.build.getWorkspace().getRemote() + '/GroovyFailedBuildsCount.txt') f.createNewFile() f.write(text)
And thirdly, you need to send an email. At the top of my head, you can note that the first failed builds are unstable, and when the limit is reached, mark the build as unsuccessful and add the email-ext plugin to send email notifications only in case of failures.
Groovy getting started helped me.
source share