griddynamics / mpl

[IT-36925] Jenkins Shared Modular Pipeline Library
https://blog.griddynamics.com/developing-a-modular-pipeline-library-to-improve-devops-collaboration/
Apache License 2.0
158 stars 97 forks source link

MPLManager.instance.<any api> is throwing null Pointer #35

Closed amiteshsharma closed 5 years ago

amiteshsharma commented 5 years ago

Hi Sergei,

I checked out the mpl framework hosted in this repo. However was not able to run below instructions.

@Library('mpl') _ MPLPipeline {}

Error: java.lang.NullPointerException at com.cloudbees.groovy.cps.impl.CpsCallableInvocation.invoke(CpsCallableInvocation.java:51)

It seems invoking @Singleton Mgr class is throwing exception.

Env: Using: Jenkins 2.176.2

Note: Similar issue reported in https://stackoverflow.com/questions/52609080/jenkins-scripted-pipeline-singleton-null-pointer-exception

Can you please suggest the fix.

Thanks and Regards, Amitesh

sparshev commented 5 years ago

Hi @amiteshsharma ,

That's weird - I tried to run the latest master & MPL-10 branch on 2.176.2 again, but saw no such issues. Could you please list the plugins/versions you using on your jenkins?

Also it's quite hard to say what exactly you running - did you tried to run the MPL-build example?

Thank you.

amiteshsharma commented 5 years ago

Hi Sergei,

Thanks a lot for your prompt response.

Yes, i tried with other examples shared in mpl.wiki, as well, and got same issue. However, right now I have quite a lot of plugins which are not being used. As per your confirmation, if it's working with latest version, i'll cross check the mpl behavior again with only needful plugins, and removing uncessary ones.

In case i face the issue again, will surely get back to you.

Thanks and Best Regards, Amitesh

sparshev commented 5 years ago

Ok, I will close it for now - but please feel free to reopen when you will find some additional information.