Sonarqube warning to replace sonar.login to sonar.token

We’re seeing the warning about still using sonar.login on the project pages. Same as this issue and the linked Jira story SONARJNKNS-361 says an option was added to use sonar.token, but I don’t see the option anywhere under the Advanced dropdown of the server config. Jira issue says it was fixed in 2.16.

image

  • Community Edition - Version 10.3 (build 82913)
  • SonarQube Scanner for Jenkins Version 2.17.1

Hey there.

Is it possible you’ve manually specified sonar.login somewhere in your Jenkinsfile?

No, We were using the withSonarQubeEnv block provided to get the sonar server config.

Based on the image in the Jira issue, I don’t see this option anywhere in the Advanced settings

image

Thanks. That screenshot represents one implementation idea that we didn’t go with in the end. Jenkins should be querying SonarQube to check the version and decide which to use (defauling to sonar.login if that query fails).

I’m going to pass this onto an expert to help you debug this.

Hello Chris,

As Colin said, the step will default to sonar.login if it fails to get the SQ version.
Can you please check your Jenkins system logs (not the pipeline logs) if you see a warning “Failed to retrieve SonarQube instance version, ‘sonar.login’ is used by default” at the time of a build?