Greetings,

I have a plug-in [1] 
<https://github.com/dice-project/DICE-Jenkins-Plugin/tree/develop> that 
worked for freestyle projects. I converted it to support Jenkins Pipelines. 
It generally works as it should, except after Jenkins starts and before a 
new build gets executed. In this case, when I open the dashboard of the 
project configured with the plug-in, I get an error:

    WARNING: Caught exception evaluating: it.getMetricNames() in 
/jenkins/job/QualityTestingPipeline/dice-dashboard/. Reason: 
java.lang.NullPointerException
    java.lang.NullPointerException
        at 
org.jenkinsci.plugins.workflow.job.WorkflowJob._getRuns(WorkflowJob.java:231)
        at 
org.jenkinsci.plugins.workflow.job.WorkflowJob._getRuns(WorkflowJob.java:113)
        at hudson.model.Job.getBuilds(Job.java:706)
        at 
eu.diceh2020.jenkinsci.plugins.diceqt.DiceQTResultProjectAction.getCurrentBuildHistory(DiceQTResultProjectAction.java:160)
        at 
eu.diceh2020.jenkinsci.plugins.diceqt.DiceQTResultProjectAction.getMetricNames(DiceQTResultProjectAction.java:105)

I have seen this post [2] 
<https://issues.jenkins-ci.org/browse/JENKINS-38763> that looked like it 
was addressing a similar problem. I tried to apply it for my plug-in [3] 
<https://github.com/dice-project/DICE-Jenkins-Plugin/commit/5d32218a5eaa887b14140831aec2fba1a5c26b2d#diff-3e3d241be9a66161a8408a9610b3fe54>,
 
but now I get a NullPointerException even earlier:

    Caused by: java.lang.NullPointerException
        at 
eu.diceh2020.jenkinsci.plugins.diceqt.DiceQTResultProjectAction.getCurrentBuildHistory(DiceQTResultProjectAction.java:171)
        at 
eu.diceh2020.jenkinsci.plugins.diceqt.DiceQTResultProjectAction.doDisplayGraph(DiceQTResultProjectAction.java:190)

So now the project doesn't get initialized at all. Also, none of the 
RunAction2 methods seem to be called, at least there is no output in the 
console for them. What am I missing?

Thank you!
Matej

[1] https://github.com/dice-project/DICE-Jenkins-Plugin/tree/develop
[2] https://issues.jenkins-ci.org/browse/JENKINS-38763
[3] 
https://github.com/dice-project/DICE-Jenkins-Plugin/commit/5d32218a5eaa887b14140831aec2fba1a5c26b2d#diff-3e3d241be9a66161a8408a9610b3fe54

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/5bce9f80-f352-4dc6-b87d-ae30ab9857f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to