Skip to content

Commit 688dc40

Browse files
auth fix new sonar versions
1 parent 88e37e0 commit 688dc40

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

plugin.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,10 @@ func getStatus(task *TaskResponse, report *SonarReport) string {
770770
"error": err,
771771
}).Fatal("Failed get status")
772772
}
773-
773+
fmt.Printf("==> Job Quality Gate Request:\n")
774+
fmt.Printf(report.ServerURL + "/api/qualitygates/project_status?" + reportRequest.Encode())
775+
fmt.Printf("\n")
776+
fmt.Printf("\n")
774777
projectRequest.Header.Add("Authorization", "Basic "+base64.StdEncoding.EncodeToString([]byte(sonarToken+":")))
775778
projectResponse, err := netClient.Do(projectRequest)
776779

@@ -791,6 +794,9 @@ func getStatus(task *TaskResponse, report *SonarReport) string {
791794
}
792795

793796
buf, _ := io.ReadAll(projectResponse.Body)
797+
fmt.Printf("==> Report Result:\n")
798+
fmt.Println(string(buf))
799+
fmt.Printf("\n")
794800
project := ProjectStatusResponse{}
795801
if err := json.Unmarshal(buf, &project); err != nil {
796802
logrus.WithFields(logrus.Fields{

0 commit comments

Comments
 (0)