SonarQube Jenkins
  1. SonarQube Jenkins
  2. SONARJNKNS-33

Sonar Link on Jenkins project points to a different location

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1
    • Labels:
      None
    • Number of attachments :
      2

      Description

      Hi,

      We have created various sonar build projects in Jenkins that are built successfully and have successful sonar analysis. The issue lies in the UI link.

      Our setup of Jenkins is hosted on a https URL.

      Our Original Sonar analysis for any project should be displayed through the URL:
      https://<Jenkins site>/sonar/dashboard/index/<Project name/ID> --> This opens correctly if copy pasted in a browser.

      We face two failing scenarios on accessing the Sonar link of a particular project through Jenkins:

      1.) If we try to access the 'Sonar' link directly from the main project page in Jenkins, it directs to a URL that does not contain a https, rather a http. Thus, the website says : Unable to connect. (Attached image #1)

      It connects to: http://<Jenkins site>/sonar/dashboard/index/<Project name/ID>

      2.) If we try to right click on the 'Sonar' link and open it in a new window/tab, it converts the URL into entirely something different. eg:

      https://<Jenkins site>/sonar/project/index/<Project name/ID>

      Notice that the word 'dashboard' gets converted to 'project', even though the https remains intact.

      I am not sure if it would be reproduceable at your end, but we have upgraded to the latest version of Jenkins 1.442, and yet the issue persists.

      Kindly provide a solution.

      Thanks.

        Issue Links

          Activity

          Hide
          Julien HENRY added a comment -

          The first part of the URL come from the configuration of the Sonar server in Jenkins:

          So there is nothing we can do concerning the "s" of https as it is up to you to configure properly your Sonar instance in Jenkins.

          Concerning the difference project vs dashboard there is a redirection project -> dashboard on Sonar side so nothing strange here.

          Anyway the generation of the URL will be reworked with SONARPLUGINS-2814

          Show
          Julien HENRY added a comment - The first part of the URL come from the configuration of the Sonar server in Jenkins: Server Public URL if empty: Server URL if empty: http://localhost:9000 So there is nothing we can do concerning the "s" of https as it is up to you to configure properly your Sonar instance in Jenkins. Concerning the difference project vs dashboard there is a redirection project -> dashboard on Sonar side so nothing strange here. Anyway the generation of the URL will be reworked with SONARPLUGINS-2814
          Hide
          Fabrice Bellingard added a comment -

          Indeed, should be fixed thanks to SONARPLUGINS-2814.

          Public URL for Sonar instance must be set on Sonar (in the global configuration => "General Settins > General > Server base URL").

          Show
          Fabrice Bellingard added a comment - Indeed, should be fixed thanks to SONARPLUGINS-2814 . Public URL for Sonar instance must be set on Sonar (in the global configuration => "General Settins > General > Server base URL").

            People

            • Assignee:
              Julien HENRY
              Reporter:
              Kavi
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: