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

Links to SonarQube project pages incorrect when using multiple "Invoke standalone Sonar analysis" steps with different branch values

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • sonar-plugin
    • None

      The Sonar(-Qube) plugin creates links to the SonarQube project(s) on the SonarQube server on the Jenkins job page SonarRunner was invoked for. In case the project contains multiple (2 in our case) "Invoke standalone Sonar analysis" steps with different "sonar.branch" values, the plugin creates multiple links but all point to the first branch, there is no link for the second branch.

          [JENKINS-21492] Links to SonarQube project pages incorrect when using multiple "Invoke standalone Sonar analysis" steps with different branch values

          T.B. Anton added a comment - - edited

          We have two Sonar installations defined (one test one production). However the link on the job page points to the first defined installation, although the job is configured to use the second installation. I also discovered, that the link is not updated when the job configuration changes. That means switching from installation Foo to installation Bar will not change the link accordingly.

          We use SonarQube Plugin 2.2.1.

          T.B. Anton added a comment - - edited We have two Sonar installations defined (one test one production). However the link on the job page points to the first defined installation, although the job is configured to use the second installation. I also discovered, that the link is not updated when the job configuration changes. That means switching from installation Foo to installation Bar will not change the link accordingly. We use SonarQube Plugin 2.2.1.

          T.B. Anton added a comment -

          I fiddled around some more trying to work around this bug. I used the scripts provided to reassign jobs. The first script reported a job as having an unknown Sonar instance referenced. That's most likely due to the fact that we only have one instance defined. That makes the Sonar instance selection unavailable. Yet, I'm still puzzled as to where the faulty URL is being picked up. I looked through the configuration files in $JENKINS_HOME, but couldn't find a mention of the faulty URL - not in hudson.plugins.sonar.SonarPublisher.xml nor in hudson.plugins.sonar.SonarRunnerInstallation.xml.

          T.B. Anton added a comment - I fiddled around some more trying to work around this bug. I used the scripts provided to reassign jobs . The first script reported a job as having an unknown Sonar instance referenced. That's most likely due to the fact that we only have one instance defined. That makes the Sonar instance selection unavailable. Yet, I'm still puzzled as to where the faulty URL is being picked up. I looked through the configuration files in $JENKINS_HOME , but couldn't find a mention of the faulty URL - not in hudson.plugins.sonar.SonarPublisher.xml nor in hudson.plugins.sonar.SonarRunnerInstallation.xml .

            sonarteam Sonar Team
            rschuetz Ronny Schuetz
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: