Open shivani-hotstar opened 5 years ago
Same issue here..any help
+1
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.
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 :-