Hi All,

Trying to update the build descriptor  with the build cause found through 
the "build analyser plugin".

Here is the groovy Post Build Script using to update the build descriptor:
=========
import hudson.model.Action
import hudson.model.BuildBadgeAction
import hudson.model.ModelObject
import com.sonyericsson.jenkins.plugins.bfa.model.FailureCauseBuildAction
def action = 
manager.build.getAction(com.sonyericsson.jenkins.plugins.bfa.model.FailureCauseBuildAction.class)
def causes = action.getFoundFailureCauses();
manager.build.setDescription(causes[0].getDescription())
============


But this is failling with Error :

java.lang.NullPointerException: Cannot invoke method getFoundFailureCauses() on 
null object
        at 
org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:91)
        at 
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:48)
        at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
        at 
org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:35)
        at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
        at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
        at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)


Regards,
Basanta

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/2211f47c-58f5-4167-8143-c19791c74f78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to