Skip to content
This repository has been archived by the owner on Feb 8, 2021. It is now read-only.

sonar.quality.gate.plugin not working with GOCD pipeline #30

Open
shivani-hotstar opened this issue Sep 9, 2019 · 3 comments
Open

sonar.quality.gate.plugin not working with GOCD pipeline #30

shivani-hotstar opened this issue Sep 9, 2019 · 3 comments

Comments

@shivani-hotstar
Copy link

shivani-hotstar commented Sep 9, 2019

I am using sonarqube version : 7.9.1 and GOCD version: 19.5.0 .

ISSUE:-

[go] Task: Plugin with ID: sonar.quality.gate.plugintook: 1.263s
[SonarQube Quality Gate Plugin] configuration setting 'SonarProjectKey' is 'xyz-projects'
[SonarQube Quality Gate Plugin] configuration setting 'StageName' is ''
[SonarQube Quality Gate Plugin] configuration setting 'JobCounter' is ''
[SonarQube Quality Gate Plugin] configuration setting 'JobName' is ''
[SonarQube Quality Gate Plugin] configuration setting 'IssueTypeFail' is 'error'
[SonarQube Quality Gate Plugin] configuration setting 'SonarApiUrl' is 'https://sonarqube.abc.com/api/qualitygates/project_status?projectKey=xyz-projects'
[SonarQube Quality Gate Plugin] checking quality gate result for: xyz-projects
[SonarQube Quality Gate Plugin] API Url: https://sonarqube.abc.com/api/qualitygates/project_status?projectKey=xyz-projects
[SonarQube Quality Gate Plugin] Fail if: error
[SonarQube Quality Gate Plugin] Error during get or parse of quality gate result. Please check if a quality gate is defined
REST call failed; URL=https://sonarqube.abc.com/api/qualitygates/project_status?projectKey=xyz-projects/qualitygates/project_status?projectKey=xyz-projects; Code=401; Message=
Failed to get quality gate for xyz-projects. Please check if a quality gate is defined

i have tried with :- [SonarQube Quality Gate Plugin] API Url: https://sonarqube.abc.com/api this url as well but same error.

Plugin i am using :-
Screenshot 2019-09-09 at 4 03 47 PM

@saran2250
Copy link

Same issue here..any help

@monikakatiyar16
Copy link

+1

@xpresser
Copy link

xpresser commented Jan 11, 2021

I am also getting an error when trying to run a pipeline with a job which includes sonar.quality.gate.plugin.

Error during get or parse of quality gate result.
Please check if a quality gate is definedA JSONArray text must start with '[' at 1 [character 2 line 1]
Error: class org.json.JSONException declares multiple JSON fields named cause

Using only mvn clean package sonar:sonar for the task in GoCD, without the plugin, it works perfectly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants