-
Bug
-
Resolution: Fixed
-
Minor
-
None
Hi,
I am recently getting the below error on Jenkins startup about listviews created through configuration as code.
2021-03-09 22:57:28.223+0000 [id=27] SEVERE jenkins.InitReactorRunner$1#onTaskFailed: Failed ConfigurationAsCode.init2021-03-09 22:57:28.223+0000 [id=27] SEVERE jenkins.InitReactorRunner$1#onTaskFailed: Failed ConfigurationAsCode.initio.jenkins.plugins.casc.ConfiguratorException: Found incompatible configuration elements YamlSource: /var/jenkins_home/casc_configs/listviews.yaml in /var/jenkins_home/casc_configs/listviews.yaml, line 2, column 1: - script: > ^ at io.jenkins.plugins.casc.yaml.YamlUtils.merge(YamlUtils.java:102) at io.jenkins.plugins.casc.yaml.YamlUtils.merge(YamlUtils.java:125) at io.jenkins.plugins.casc.yaml.YamlUtils.merge(YamlUtils.java:52)Caused: io.jenkins.plugins.casc.ConfiguratorException: Failed to read YamlSource: /var/jenkins_home/casc_configs/listviews.yaml at io.jenkins.plugins.casc.yaml.YamlUtils.merge(YamlUtils.java:56) at io.jenkins.plugins.casc.yaml.YamlUtils.loadFrom(YamlUtils.java:150) at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:616) at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:298) at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:290)Caused: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)Caused: java.lang.Error at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110) at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296) at jenkins.model.Jenkins$5.runTask(Jenkins.java:1133) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)2021-03-09 22:57:28.234+0000 [id=20] SEVERE hudson.util.BootFailure#publish: Failed to initialize Jenkins
The content of the listview.yaml file looks like below
jobs: - script: > listView('TestView1') { description('TestView1') jobs { names('TestJob1','TestJob2') } columns { status() weather() name() lastSuccess() lastFailure() lastDuration() buildButton() } } - script: > listView('TestView2') { jobs { regex(/TestView2.*/) } columns { status() weather() name() lastSuccess() lastFailure() lastDuration() buildButton() } }
See a screenshot of the error message below in comments as the error message copied above has been changed visually.
Jenkins version - 2.222.4
configuration-as-code:1.43
Anyone experience this? Appreciate if you can shed some light on this.
Thanks
Manoj