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

Cannot configure msBuildSQRunnerInstallation global tool using JCASC

XMLWordPrintable

      The JCASC YAML blow was copied from the view JCASC config in Jenkins.  If I build a server that includes this JCASC code Jenkins fails to start.  If I remove this code Jenkins fails to start.

       

      JCASC YAML:

      ---
      controller:
        JCasC:
          configScripts:
            tools-config: |
              tool:
                msBuildSQRunnerInstallation:
                  installations:
                  - name: "sonarscanner_net5"
                    properties:
                    - installSource:
                        installers:
                        - msBuildSonarQubeRunnerInstaller:
                            id: "5.7.2.50892-net5"
                  - name: "sonarscanner_fwk4"
                    properties:
                    - installSource:
                        installers:
                        - msBuildSonarQubeRunnerInstaller:
                            id: "5.7.2.50892" 

      Jenkins Log Error:

      2022-08-29 21:23:44.527+0000 [id=20]    SEVERE  hudson.util.BootFailure#publish: Failed to initialize Jenkins
      io.jenkins.plugins.casc.ConfiguratorException: home is required to configure class hudson.plugins.sonar.MsBuildSQRunnerInstallation
              at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.tryConstructor(DataBoundConfigurator.java:132)
              at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.instance(DataBoundConfigurator.java:76)
              at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:267)
              at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.check(DataBoundConfigurator.java:100)
              at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:344)
              at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:287)
              at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:351)
              at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:287)
              at io.jenkins.plugins.casc.ConfigurationAsCode.lambda$checkWith$8(ConfigurationAsCode.java:777)
              at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:713)
      Caused: io.jenkins.plugins.casc.ConfiguratorException: tool: error configuring 'tool' with class io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator configurator
              at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:719)
              at io.jenkins.plugins.casc.ConfigurationAsCode.checkWith(ConfigurationAsCode.java:777)
              at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:762)
              at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:638)
              at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:307)
              at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:299)
      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:1129)
              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:68)
              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: org.jvnet.hudson.reactor.ReactorException
              at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:282)
              at jenkins.InitReactorRunner.run(InitReactorRunner.java:49)
              at jenkins.model.Jenkins.executeReactor(Jenkins.java:1162)
              at jenkins.model.Jenkins.<init>(Jenkins.java:960)
              at hudson.model.Hudson.<init>(Hudson.java:86)
              at hudson.model.Hudson.<init>(Hudson.java:82)
              at hudson.WebAppMain$3.run(WebAppMain.java:295)
      Caused: hudson.util.HudsonFailedToLoad
              at hudson.WebAppMain$3.run(WebAppMain.java:312) 

            sonarteam Sonar Team
            daxgames Dax Games
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: