You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a NullPointerException thrown when trying to load a pipeline config with a nested AGENT keyword. The workaround we're using is just renaming the AGENT keyword at the lowest level, I know there are some differences between groovy and how the template engine loads variables, but if nested values of the same key aren't supported I would have expected a pipeline configuration error thrown by the plugin instead of a null pointer?
We only noticed this when using nested pipeline configs.
We load our configs and libraries using the SCM option.
Relevant log output
java.lang.NullPointerException
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:281)
at org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:901)
at org.codehaus.groovy.runtime.InvokerHelper$getMetaClass.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.InvokerHelper$getMetaClass.call(Unknown Source)
at org.boozallen.plugins.jte.init.governance.config.dsl.PipelineConfigurationObject$_clear_prop_closure6.doCall(PipelineConfigurationObject.groovy:130)
at jdk.internal.reflect.GeneratedMethodAccessor711795.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
at groovy.lang.Closure.call(Closure.java:420)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.inject(DefaultGroovyMethods.java:5518)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.inject(DefaultGroovyMethods.java:5459)
at org.codehaus.groovy.runtime.dgm$339.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:136)
at org.boozallen.plugins.jte.init.governance.config.dsl.PipelineConfigurationObject.clear_prop(PipelineConfigurationObject.groovy:129)
at jdk.internal.reflect.GeneratedMethodAccessor712491.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:352)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:68)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:177)
at org.boozallen.plugins.jte.init.governance.config.dsl.PipelineConfigurationObject$_plus_closure1.doCall(PipelineConfigurationObject.groovy:77)
at jdk.internal.reflect.GeneratedMethodAccessor710841.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
at groovy.lang.Closure.call(Closure.java:420)
at groovy.lang.Closure.call(Closure.java:436)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2125)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2110)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2163)
at org.codehaus.groovy.runtime.dgm$165.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
at org.boozallen.plugins.jte.init.governance.config.dsl.PipelineConfigurationObject.plus(PipelineConfigurationObject.groovy:75)
at org.boozallen.plugins.jte.init.governance.config.dsl.PipelineConfigurationObject$plus.call(Unknown Source)
at org.boozallen.plugins.jte.init.PipelineConfigurationAggregator$_aggregate_closure1.doCall(PipelineConfigurationAggregator.groovy:51)
at jdk.internal.reflect.GeneratedMethodAccessor711794.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
at groovy.lang.Closure.call(Closure.java:420)
at groovy.lang.Closure.call(Closure.java:436)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2125)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2110)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2151)
at org.codehaus.groovy.runtime.dgm$163.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
at org.boozallen.plugins.jte.init.PipelineConfigurationAggregator.aggregate(PipelineConfigurationAggregator.groovy:48)
at org.boozallen.plugins.jte.init.PipelineConfigurationAggregator$aggregate$0.call(Unknown Source)
at org.boozallen.plugins.jte.job.TemplateFlowDefinition.create(TemplateFlowDefinition.groovy:77)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
Steps to Reproduce
Setup a pipeline config on the main branch of a jenkins templates repository:
Configure Jenkins to globally load the main pipeline config.
Configure your job to load the testing pipeline config.
After starting the job the error should appear when trying to load the test branch pipeline config file.
The text was updated successfully, but these errors were encountered:
Jenkins Version
2.414.1
JTE Version
2.5.3
Bug Description
There is a NullPointerException thrown when trying to load a pipeline config with a nested
AGENT
keyword. The workaround we're using is just renaming theAGENT
keyword at the lowest level, I know there are some differences between groovy and how the template engine loads variables, but if nested values of the same key aren't supported I would have expected a pipeline configuration error thrown by the plugin instead of a null pointer?We only noticed this when using nested pipeline configs.
We load our configs and libraries using the SCM option.
Relevant log output
Steps to Reproduce
Setup a pipeline config on the main branch of a jenkins templates repository:
Setup a "testing" pipeline config on another branch:
Configure Jenkins to globally load the main pipeline config.
Configure your job to load the testing pipeline config.
After starting the job the error should appear when trying to load the test branch pipeline config file.
The text was updated successfully, but these errors were encountered: