Created
July 11, 2018 09:01
-
-
Save willis7/2ca615cd7f9399fbd5f1575731a4b82b to your computer and use it in GitHub Desktop.
This adds a runner that will be installed automatically from Maven central
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jenkins.model.* | |
import hudson.plugins.sonar.* | |
import hudson.tools.* | |
def inst = Jenkins.getInstance() | |
def desc = inst.getDescriptor("hudson.plugins.sonar.SonarRunnerInstallation") | |
def installer = new SonarRunnerInstaller("[sonar runner version]") | |
def prop = new InstallSourceProperty([installer]) | |
def sinst = new SonarRunnerInstallation("[name of the sonar runner - I called it Default]", "[home? - not sure how this is used and I left it blank]", [prop]) | |
desc.setInstallations(sinst) | |
desc.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment