Haufe-Lexware / gocd-plugins

A collection of our OSS plugins for use with Go.CD
Apache License 2.0
36 stars 34 forks source link

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

Open shivani-hotstar opened 5 years ago

shivani-hotstar commented 5 years ago

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 commented 4 years ago

Same issue here..any help

monikakatiyar16 commented 4 years ago

+1

xpresser commented 3 years ago

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.