Open
Description
Version report
2.1.1
Jenkins and plugins versions report:
Jenkins: 2.2.49.2
Sonar: 8.4.1
- What Operating System are you using (both controller, and any agents involved in the problem)?
Linux 3.10.0-1127.19.1.el7.x86_64
Reproduction steps
Setup Publish of coverage using plugin
Results
Expected result:
It should be able to find the master coverage from Sonar
Actual result:
The API used to search for projects is /api/projects/index?search=
which is no longer supported by sonar. The plugin fails to find the master coverage from sonar.
{
"errors": [
{
"msg": "Unknown url : /api/projects/index"
}
]
}
Jenkins output
00:23:28 [GitHub PR Status] start
00:23:28 [GitHub PR Status] getting master coverage...
00:23:28 take master coverage from sonar by token
00:23:29 Getting coverage for Git Repo URL: <git repo path> by repo name: <git project name>
00:23:29 Failed to get master coverage for <git repo path>
00:23:29 Exception message 'com.github.terma.jenkins.githubprcoveragestatus.SonarMasterCoverageRepository$SonarProjectRetrievalException: failed to search for sonar project <git project name> - Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
00:23:29 at [Source: (org.apache.commons.httpclient.AutoCloseInputStream); line: 1, column: 2]'
00:23:29 com.github.terma.jenkins.githubprcoveragestatus.SonarMasterCoverageRepository$SonarProjectRetrievalException: failed to search for sonar project profile-diagnostics - Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')