How to declare tool type "hudson.plugins.sonar.SonarRunnerInstallation" in declarative pipeline?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

How to declare tool type "hudson.plugins.sonar.SonarRunnerInstallation" in declarative pipeline?

Hi, I am trying to run sonar scanner by declarative pipeline with tools.

In declarative pipeline, I can define "tools" and I know valid tool types are [ant, hudson.tasks.Ant$AntInstallation,, git, hudson.plugins.git.GitTool, jdk, hudson.model.JDK, jgit, org.jenkinsci.plugins.gitclient.JGitTool, jgitapache, org.jenkinsci.plugins.gitclient.JGitApacheTool, maven, hudson.tasks.Maven$MavenInstallation, hudson.plugins.mercurial.MercurialInstallation, hudson.plugins.sonar.SonarRunnerInstallation, hudson.plugins.sonar.MsBuildSQRunnerInstallation]

But when I set hudson.plugins.sonar.SonarRunnerInstallation in pipeline tools, I get error.
The pipeline is:
pipeline {
    agent any
hudson.plugins.sonar.SonarRunnerInstallation 'sonar-scanner-3.2.0'

The error message is "unexpected token: sonar-scanner-3.2.0".
Does anyone know how to set sonar runner tool in declarative pipeline?

You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit
For more options, visit