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

Option "Prepare SonarQube Scanner Environment" missing in Job DSL Plugin

      Via the GUI, I can choose the Option "Prepare SonarQube Scanner Environment" (see the attached screenshot). I could not find this option in the Job DSL Plugin (searched the API and the source code via grep). That is why I can not generate my Jobs with this option selected automatically.

      Without this option, I can not start the Maven SonarQube goal, because the SonarQube environment variables are missing.

      My current workaround is to also define the SonarQube environment variables as global environment variables. Then I can also use them in my generated jobs.

          [JENKINS-42741] Option "Prepare SonarQube Scanner Environment" missing in Job DSL Plugin

          This is supported by the Automatically Generated DSL:

          job(String name) {
            wrappers {
              withSonarQubeEnv {
                installationName(String value)
              }
            }
          }

          Daniel Spilker added a comment - This is supported by the Automatically Generated DSL : job( String name) { wrappers { withSonarQubeEnv { installationName( String value) } } }

          You are right and this works for me. Thank you!

          Erik Nellessen added a comment - You are right and this works for me. Thank you!

            daspilker Daniel Spilker
            erik_nellessen Erik Nellessen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: