I have a
plug-in [1] 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)
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