[JIRA] (JENKINS-38101) Credentials are not working with newest Sonarqube version

31 views
Skip to first unread message

gamergeramy@googlemail.com (JIRA)

unread,
Sep 9, 2016, 9:59:02 AM9/9/16
to jenkinsc...@googlegroups.com
Colin Weber created an issue
 
Jenkins / Bug JENKINS-38101
Credentials are not working with newest Sonarqube version
Issue Type: Bug Bug
Assignee: Ivana Sh
Components: quality-gates-plugin
Created: 2016/Sep/09 1:58 PM
Environment: OS: Linux Debian with Java 1.8.0_101
Jenkins 2.2.4
Quality Gates Plugin: 2.5
SonarQube: 6.0
Priority: Major Major
Reporter: Colin Weber

Some days ago I reinstall all my systems to the versions under Enviroment. The problem now is, that I setup working credentials under "Jenkins / Manage / Quality Gate". (I am using the same credentials for the other sonar plugin to run the scanner, so they are correct) But for some reason I get the following Issue:

quality.gates.jenkins.plugin.QGException: Expected status 200, got: 401. Response: 
	at quality.gates.sonar.api.SonarHttpRequester.executeGetRequest(SonarHttpRequester.java:59)
	at quality.gates.sonar.api.SonarHttpRequester.getAPIInfo(SonarHttpRequester.java:47)
	at quality.gates.sonar.api.QualityGatesProvider.getRequesterResult(QualityGatesProvider.java:34)
	at quality.gates.sonar.api.QualityGatesProvider.getAPIResultsForQualityGates(QualityGatesProvider.java:29)
	at quality.gates.jenkins.plugin.BuildDecision.getStatus(BuildDecision.java:20)
	at quality.gates.jenkins.plugin.QGPublisher.perform(QGPublisher.java:73)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
	at hudson.model.Build$BuildExecution.post2(Build.java:185)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
	at hudson.model.Run.execute(Run.java:1745)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:404)
Build step 'Quality Gates' marked build as failure

I also tested to reconfigure Sonarqube without credentials (allow anonymous): This is working.
Using default credentials (admin/admin): Also not working

I think the login is broken.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

arkanjo.ms@gmail.com (JIRA)

unread,
Sep 9, 2016, 1:50:02 PM9/9/16
to jenkinsc...@googlegroups.com
Rafael Ramos commented on Bug JENKINS-38101
 
Re: Credentials are not working with newest Sonarqube version

The login api is changed in sonar 6.0. The new service is api/authentication/login.
I updated in a fork - https://github.com/arkanjoms/quality-gates-plugin
But this is not a correct way to fix the problem, because this way breakes the login to the old sonar.

aburdajewicz@cloudbees.com (JIRA)

unread,
Nov 29, 2018, 12:55:02 AM11/29/18
to jenkinsc...@googlegroups.com

If there is any way to retrieve the sonar version (headers or an API that do no require login) maybe this could be a simple conditional.

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

aburdajewicz@cloudbees.com (JIRA)

unread,
Nov 29, 2018, 12:55:03 AM11/29/18
to jenkinsc...@googlegroups.com
Allan BURDAJEWICZ edited a comment on Bug JENKINS-38101
If there is any way to retrieve the sonar version (headers or an API endpoint that do no require login) maybe this could be a simple conditional.

aburdajewicz@cloudbees.com (JIRA)

unread,
Nov 29, 2018, 1:08:02 AM11/29/18
to jenkinsc...@googlegroups.com
Allan BURDAJEWICZ edited a comment on Bug JENKINS-38101
If there is any way to retrieve the sonar version (headers or an API endpoint that do no require login) maybe this could be a simple conditional.
Reply all
Reply to author
Forward
0 new messages