-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
jenkins version-1.644
Plugins
ant 1.2 true false
antisamy-markup-formatter 1.1 true false
build-flow-extensions-plugin 0.1.1 true false
build-flow-plugin 0.18 true false
build-flow-test-aggregator 1.2 true false
build-name-setter 1.5.1 true false
buildgraph-view 1.1.1 true false
conditional-buildstep 1.3.3 true false
credentials 1.18 true false
cvs 2.11 true false
email-ext 2.41.3 true false
envinject 1.92.1 true false
external-monitor-job 1.4 true false
fail-the-build-plugin 1.0 true false
groovy-postbuild 2.3.1 true false
javadoc 1.1 true false
jenkins-multijob-plugin 1.20 true false
junit 1.10 true true
ldap 1.11 true false
mailer 1.11 true false
matrix-auth 1.1 true false
matrix-project 1.4.1 true false
maven-plugin 2.7.1 true false
pam-auth 1.1 true false
parameterized-trigger 2.30 true false
run-condition 1.0 true false
script-security 1.17 true true
simple-theme-plugin 0.3 true false
ssh-credentials 1.10 true false
ssh-slaves 1.9 true false
subversion 1.54 true false
tag-profiler 0.2 true false
token-macro 1.12.1 true false
translation 1.10 true false
ui-samples-plugin 2.0 true false
windows-slaves 1.0 true falsejenkins version-1.644 Plugins ant 1.2 true false antisamy-markup-formatter 1.1 true false build-flow-extensions-plugin 0.1.1 true false build-flow-plugin 0.18 true false build-flow-test-aggregator 1.2 true false build-name-setter 1.5.1 true false buildgraph-view 1.1.1 true false conditional-buildstep 1.3.3 true false credentials 1.18 true false cvs 2.11 true false email-ext 2.41.3 true false envinject 1.92.1 true false external-monitor-job 1.4 true false fail-the-build-plugin 1.0 true false groovy-postbuild 2.3.1 true false javadoc 1.1 true false jenkins-multijob-plugin 1.20 true false junit 1.10 true true ldap 1.11 true false mailer 1.11 true false matrix-auth 1.1 true false matrix-project 1.4.1 true false maven-plugin 2.7.1 true false pam-auth 1.1 true false parameterized-trigger 2.30 true false run-condition 1.0 true false script-security 1.17 true true simple-theme-plugin 0.3 true false ssh-credentials 1.10 true false ssh-slaves 1.9 true false subversion 1.54 true false tag-profiler 0.2 true false token-macro 1.12.1 true false translation 1.10 true false ui-samples-plugin 2.0 true false windows-slaves 1.0 true false
I am using the build flow project for combining the two different project test results.Then i am in need to change the build status of the aggregated test results so i am using groovy postbuild to change my build status.In that script if any one of the test fails gets failed in any of the projects then i am trying to change the build status to unstable.For that i am calculating the fail counts from both results using groovy script.But when i am trying this it throws the NULL pointer Exception.
The script i used in the groovy postbuild is
def testResult = manager.build.testResultAction.result
def fail = testResult.failCount
if(fail==NULL)
{
manager.buildSuccess()
}
else
{
manager.buildUnstable()
}
It throws the exception as
ava.lang.NullPointerException: Cannot get property 'result' on null object
at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:56)
at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:156)
at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:44)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227)
at Script1.run(Script1.groovy:1)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:580)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:618)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:589)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript.evaluate(SecureGroovyScript.java:166)
at org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder.perform(GroovyPostbuildRecorder.java:362)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
at hudson.model.Run.execute(Run.java:1763)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)