I have seen another issue with the groovy implementation. The sample code
for extended email plugin jenkins-matrix-email-html.template has
references to icons
that look like this:
if (build.result == Result.SUCCESS) {
result_img = "static/e59dfe28/images/32x32/blue.gif"
} else if (build.result == Result.FAILURE) {
result_img = "static/e59dfe28/images/32x32/red.gif"
} else {
result_img = "static/e59dfe28/images/32x32/yellow.gif"
}
We had something similar to this in our own groovy code that generates
emails. One day out of nowhere these icons disappeared from the system.
It seems to me that the groovy implementation in the extended email plugin,
works to a certain degree and if it stops to work then it stops to work.
I will continue my trial and error experiments. If I find anything that
might be useful to others I will share it.
On Friday, October 24, 2014 10:24:09 PM UTC-7, slide wrote:
>
> That error really isn't important, it shouldn't be marked SEVERE, it's not
> actually an error. I don't think it relates to what you are seeing.
>
> On Fri, Oct 24, 2014 at 9:40 PM, Sam T <[email protected] <javascript:>>
> wrote:
>
>> I am getting conflicting results now. After removing the groovy postbuild
>> task, one of my jobs sends email but another job keeps failing with this
>> error message.
>> So, perhaps this is a base groovy error with the extended-email plugin
>> after all. Here is the error message.
>>
>> Oct 24, 2014 8:53:22 PM
>> hudson.plugins.emailext.plugins.content.ScriptContent createEngine
>> SEVERE: Exception on init file: java.io.FileNotFoundException:
>> /home/jenkins/email-templates/groovy/init.groovy (No such file or directory)
>>
>> Once again, if anyone has noticed these symptoms and knows of a
>> workaround, please post. Thanks.
>>
>>
>>
>> On Friday, October 24, 2014 1:46:29 PM UTC-7, Sam T wrote:
>>>
>>> My apologies for not providing more detailed information. My jenkins is
>>> at version 1.494 . This is the way the job is setup. This job is created
>>> using multijob plugin where you can fire off other jobs and chain them
>>> together.
>>> There are three postbuild actions configured for this job in this exact
>>> order:
>>>
>>> 1) First post build is using groovypost build and it has a small code
>>> that sets the status of the top level job itself. The groovy postbuild
>>> plugin is at version 1.7 and here is the code in the job that it executes:
>>> if(manager.logContains(".*FAILURE.*")) {
>>> manager.buildFailure()
>>> }
>>>
>>> else if(manager.logContains(".*UNSTABLE.*")) {
>>> manager.buildUnstable()
>>> }
>>>
>>> 2) the next post build action is "Aggregate downstream post build
>>> results" which I believe is built into jenkins itself and there is no
>>> plugin for it.
>>>
>>> 3) the last post build action is an extended email plugin that executes
>>> code and generates email. This plugin is at version 2.21
>>>
>>> I just performed an experiment. I removed the first postbuild action
>>> for the groovy postbuild in a sample test job and I noticed that emails are
>>> generated again.
>>> So, based on this experiment, the issue seems to be with the very first
>>> post build action which is excuted by the groovy postbuild plugin.
>>> My theory is that once the groovy postbuild plugin fails, the other two
>>> post build actions are ignored and no email is sent out by jenkins.
>>>
>>> If anyone has seen a similar problem, please let me know if you have
>>> found a solution, a workaround or a way to debug the issue. Thanks.
>>>
>>>
>>>
>>> On Friday, October 24, 2014 1:07:30 PM UTC-7, slide wrote:
>>>>
>>>> What version of email-ext do you have installed?
>>>>
>>>> On Fri, Oct 24, 2014 at 11:31 AM, Sam T <[email protected]> wrote:
>>>>
>>>>> I have inherited a system that runs groovy to generate emails as a
>>>>> post build action. The system has not been changed at all and the groovy
>>>>> postbuild action and email has been working without any errors for over a
>>>>> year.
>>>>> All of a sudden emails stop being sent from those jobs that have
>>>>> groovy post build email generation. I have seen the following error in
>>>>> the
>>>>> jenkins log:
>>>>>
>>>>> SEVERE: Exception on init file: java.io.FileNotFoundException:
>>>>> /home/jenkins/email-templates/groovy/init.groovy (No such file or
>>>>> directory)
>>>>> Warning: Caused by: java.lang.AssertionError: class
>>>>> org.jvnet.hudson.plugins.groovypostbuild.GroovyScriptPath is missing
>>>>> its descriptor in public java.util.List org.jvnet.hudson.plugins.
>>>>> groovypostbuild.GroovyPostbuildRecorder.getClasspath(). See
>>>>> https://wiki.jenkins-ci.org/display/JENKINS/My+class+is+
>>>>> missing+descriptor at hudson.model.Descriptor$PropertyType.
>>>>> getItemTypeDescriptorOrDie(Descriptor.java:202)
>>>>>
>>>>> The file /home/jenkins/email-templates/groovy/init.groovy never
>>>>> existed on this server. I have examined all of our full backups of the
>>>>> /home/jenkins directory. But I still see jenkins logs a SEVERE error
>>>>> which
>>>>> is strange.
>>>>> The Java stack trace is a "warning" but that may point to an issue.
>>>>>
>>>>> I have researched and I have seen posts that claim
>>>>> /home/jenkins/email-templates/groovy/init.groovy is not even needed
>>>>> for groovy postbuild and email generation.
>>>>> I copied ./plugins/email-ext/WEB-INF/classes/hudson/plugins/
>>>>> emailext/templates/groovy/foo.init.groovy into
>>>>> /home/jenkins/email-templates/groovy/init.groovy and there is still
>>>>> no email.
>>>>> I have seen this bug regarding the groovy postbuild plugin
>>>>> https://issues.jenkins-ci.org/browse/JENKINS-13024
>>>>> I will upgrade to version 1.8 which has fixed a similar problem and
>>>>> see what happens.
>>>>>
>>>>> My question is: has anyone run into a similar issue and what was the
>>>>> steps to fix it?
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Jenkins Users" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Website: http://earl-of-code.com
>>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Website: http://earl-of-code.com
>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.