Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-51469

Adapt Essentials configuration to CasC latest and add tests upstream to watch it out

    Details

    • Sprint:
      Evergreen - Milestone 1
    • Similar Issues:

      Description

      Seems like the 0.6-alpha of CasC does not work for Essentials.

      It would be more productive for everybody if we can contribute a test that checks that our setup keeps working. It should be acceptable since it is quite a common use (setting executors, and the metrics-plugin config), and not something terribly specific to Essentials.

      The error message was:

      java.lang.Error: java.lang.reflect.InvocationTargetException
      	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:1068)
      	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
      	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      	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)
      Caused by: 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)
      	... 8 more
      Caused by: org.jenkinsci.plugins.casc.ConfiguratorException: jenkins: error configuring <jenkins> with <jenkins> configurator
      	at org.jenkinsci.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:339)
      	at org.jenkinsci.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:280)
      	at org.jenkinsci.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:252)
      	at org.jenkinsci.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:155)
      	at org.jenkinsci.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:134)
      	... 13 more
      Caused by: org.jenkinsci.plugins.casc.ConfiguratorException: Invalid configuration elements for type class hudson.model.Hudson : metricsaccesskey
      	at org.jenkinsci.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:200)
      	at org.jenkinsci.plugins.casc.JenkinsConfigurator.configure(JenkinsConfigurator.java:44)
      	at org.jenkinsci.plugins.casc.JenkinsConfigurator.configure(JenkinsConfigurator.java:24)
      	at org.jenkinsci.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:335)
      	... 17 more
      

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Baptiste Mathus
          Path:
          pom.xml
          src/test/java/org/jenkinsci/plugins/casc/EssentialsTest.java
          src/test/resources/org/jenkinsci/plugins/casc/EssentialsTest.yml
          http://jenkins-ci.org/commit/configuration-as-code-plugin/13690d70a27a827013455074fdf69914a5a77339
          Log:
          JENKINS-51469 Add Essentials configuration to CasC tests

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Baptiste Mathus Path: pom.xml src/test/java/org/jenkinsci/plugins/casc/EssentialsTest.java src/test/resources/org/jenkinsci/plugins/casc/EssentialsTest.yml http://jenkins-ci.org/commit/configuration-as-code-plugin/13690d70a27a827013455074fdf69914a5a77339 Log: JENKINS-51469 Add Essentials configuration to CasC tests

            People

            • Assignee:
              batmat Baptiste Mathus
              Reporter:
              batmat Baptiste Mathus
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: