java.lang.IllegalStateException: cannot change build result while in POST_PRODUCTION at hudson.model.Run.setResult(Run.java:458) at com.redhat.jenkins.plugins.ci.CIPolarionExporter.perform(CIPolarionExporter.java:355) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734) at hudson.model.Build$BuildExecution.cleanUp(Build.java:192) at hudson.model.Run.execute(Run.java:1805) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240)
Could you provide link to code (CIPolarionExporter.java)?
On Tuesday, November 3, 2015 at 7:07:02 PM UTC+3, Greg Allen wrote:
I have implemented a Recorder and am attempting to set the build status from it. However, when I do I get the following exception:
: cannot change build result while in POST_PRODUCTION at hudson.model.Run.setResult(Run.java:458) at com.redhat.jenkins.plugins.ci.CIPolarionExporter.perform(CIPolarionExporter.java:355) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734) at hudson.model.Build$BuildExecution.cleanUp(Build.java:192) at hudson.model.Run.execute(Run.java:1805) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240)
My class extends Recorder and according to what I have read in a Recorder it is possible to modify the build status (unlike a Notifier):
/**
* {@link Recorder} is a kind of {@link Publisher} that collects statistics from the build,
* and can mark builds as unstable/failure. This marking ensures that builds are marked accordingly
* before notifications are sent via {@link Notifier}s. Otherwise, if the build is marked failed
* after some notifications are sent, inconsistency ensues.
*/
My Jenkins version is 1.596.1, and the parent pom in my maven project where I build the plugin is 1.596.1 as well.
I feel like I am missing something obvious here, but I'm not seeing it.
Can anyone help?
Thanks,
-- Greg
--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/0c073901-0221-437d-abf0-e00d0b345449%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-dev/aoaeU6nHaIU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/5638DFE4.7050705%40redhat.com.
<CIPolarionExporter.java>
Could you cut internal code and keep skeleton (methods, class inheritance, build monitor)?
On Nov 3, 2015, at 19:25, Greg Allen <gal...@redhat.com> wrote:
Unfortunately this repo is on an internal server. I've attached the file though so you can see it.
-- Greg
On 11/03/2015 11:19 AM, Kanstantsin Shautsou wrote:
Could you provide link to code (CIPolarionExporter.java)?
On Tuesday, November 3, 2015 at 7:07:02 PM UTC+3, Greg Allen wrote:
I have implemented a Recorder and am attempting to set the build status from it. However, when I do I get the following exception:
java.lan g.IllegalStat! eException : cannot change build result while in POST_PRODUCTION at hudson.model.Run.setResult(Run.java:458)
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/E99535A3-A376-4300-A679-4343969684B6%40gmail.com.
First idea - try run on other core versions, older/newer. POST_PRODUCTION state for recorder looks wrong.
Try add build.isBuilding() and isInProgress() state print as first step in perform.
On Tuesday, November 3, 2015 at 7:51:39 PM UTC+3, Kanstantsin Shautsou wrote:
Sorry, missed attach, looking at it
On Tuesday, November 3, 2015 at 7:43:14 PM UTC+3, Greg Allen wrote:
I attached the entire file you requested to my last response. Is there something else you are looking for?
On 11/03/2015 11:27 AM, Kanstantsin Shautsou wrote:
Could you cut internal code and keep skeleton (methods, class inheritance, build monitor)?
On Nov 3, 2015, at 19:25, Greg Allen <gal...@redhat.com> wrote:
Unfortunately this repo is on an internal server. I've attached the file though so you can see it.
-- Greg
On 11/03/2015 11:19 AM, Kanstantsin Shautsou wrote:
Could you provide link to code (CIPolarionExporter.java)?
On Tuesday, November 3, 2015 at 7:07:02 PM UTC+3, Greg Allen wrote:
I have implemented a Recorder and am attempting to set the build status from it. However, when I do I get the following exception:
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/1ed500cc-b2fd-45d9-ba8d-5520f8ca65d2%40googlegroups.com.