Commit 6b4a6aae authored by Antoine Mottier's avatar Antoine Mottier
Browse files

Merge remote-tracking branch 'origin/master' into reuse-compliance

parents 49b7bdea b565b563
Pipeline #15004 passed with stages
in 1 minute and 24 seconds
......@@ -389,9 +389,9 @@ public class MainCollector {
}
/**
* Retrieves sonar component key
* Retrieves sonar component
* @param project The project name
* @return The sonarqube componentKey (or Id)
* @return The sonarqube component (or Id)
*/
public String getSonarqubeId(String project) {
return trim(config.getProperty(project + ".sonarqube"));
......@@ -552,15 +552,15 @@ public class MainCollector {
* @return Script part to gather SonarQube data (single project)
*/
public String generateSonarScript(String project) {
String componentKey = getSonarqubeId(project);
String component = getSonarqubeId(project);
String server = getSonarqubeServer(project);
String credentials = getSonarqubeCredentials(project);
if (credentials.length() > 0) credentials = " -u " + credentials;
if (componentKey == null) return null;
if (component == null) return null;
else {
return "curl -X GET" + credentials + " -H \"Content-Type: application/json\" '"
+ complementUrl(server, "/api/measures/component?metricKeys=coverage,blocker_violations,critical_violations,test_success_density,ncloc&componentKey=")
+ componentKey + "' > " + getOutputDir(true) + project + "_sonar.json";
+ complementUrl(server, "/api/measures/component?metricKeys=coverage,blocker_violations,critical_violations,test_success_density,ncloc&component=")
+ component + "' > " + getOutputDir(true) + project + "_sonar.json";
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment