Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/sonar-scan-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ should be checked using a policy.
## Environment variables
- `SONAR_TOKEN` - The sonar server token.
- `SONAR_TYPE` - Should be Either SAAS or SELFHOSTED, defaulting to SAAS.
- `SONAR_HOST_URL` - The sonar server host name, for example sonar.myconpany.org. required for SELFHOSTED type, if not provided for SAAS type sonarcloud.io is used as default.
- `SONAR_HOST_URL` - The sonar server host name, for example https://mysonar.mycorp.com, for example sonar.myconpany.org. required for SELFHOSTED type, if not provided for SAAS type sonarcloud.io is used as default.
- `SONAR_PROXY_URL` - The proxy server URL, in the format of http://your-proxy-server:port. or https://username:password@your-proxy-server:port

## Arguments
Expand Down
2 changes: 1 addition & 1 deletion examples/sonar-scan-example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func main() {
logger.Println("WaitTime:", waitTime)
}
response := SonarResponse{}
defaultSonarHost := "sonarcloud.io"
defaultSonarHost := "https://sonarcloud.io"
sonarHost := os.Getenv("SONAR_HOST_URL")

if sonar_type == "SAAS" {
Expand Down
2 changes: 1 addition & 1 deletion examples/sonar-scan-example/sonar-helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

const (
SELFHOSTED_ANALYSIS_URL = "https://$sonarhost/api/qualitygates/project_status?analysisId=$analysisId"
SELFHOSTED_ANALYSIS_URL = "$sonarhost/api/qualitygates/project_status?analysisId=$analysisId"

)
func runReport(ctx context.Context, logger *log.Logger, sonarHost string, proxyURL string, sonar_token string, reportTaskFile string, failOnAnalysisFailure bool, maxRetries int, waitTime int) (SonarResponse, error) {
Expand Down