Browse Source

SONAR-20699 Add ITs for GitHub projects onboarding from scanner

tags/10.3.0.82913
Wojtek Wajerowicz 8 months ago
parent
commit
851994819e

+ 1
- 0
.cirrus.yml View File

@@ -75,6 +75,7 @@ github_task_template: &GITHUB_TASK_TEMPLATE
'private/core-extension-developer-server/src/main/java/com/sonarsource/github/**/*.java',
'private/it-branch/it-tests/src/test/java/com/sonarsource/branch/it/suite/pr/github/**/*.java',
'private/it-branch/it-tests/src/test/java/com/sonarsource/provisioning/github/*.java',
'private/it-branch/it-tests/src/test/java/com/sonarsource/onboarding/github/*.java',
'private/core-extension-github-provisioning/**/*'
)


+ 4
- 4
sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ReportPublisher.java View File

@@ -217,12 +217,12 @@ public class ReportPublisher implements Startable {
.setParam("projectName", moduleHierarchy.root().getOriginalName())
.setPart("report", filePart);

ciConfiguration.getDevOpsPlatformInfo().ifPresent(devOpsPlatformInfo -> {
post.setParam(CHARACTERISTIC, buildCharacteristicParam(DEVOPS_PLATFORM_URL ,devOpsPlatformInfo.getUrl()));
post.setParam(CHARACTERISTIC, buildCharacteristicParam(DEVOPS_PLATFORM_PROJECT_IDENTIFIER, devOpsPlatformInfo.getProjectIdentifier()));
});
String branchName = branchConfiguration.branchName();
if (branchName != null) {
ciConfiguration.getDevOpsPlatformInfo().ifPresent(devOpsPlatformInfo -> {
post.setParam(CHARACTERISTIC, buildCharacteristicParam(DEVOPS_PLATFORM_URL ,devOpsPlatformInfo.getUrl()));
post.setParam(CHARACTERISTIC, buildCharacteristicParam(DEVOPS_PLATFORM_PROJECT_IDENTIFIER, devOpsPlatformInfo.getProjectIdentifier()));
});
if (branchConfiguration.branchType() != PULL_REQUEST) {
post.setParam(CHARACTERISTIC, buildCharacteristicParam(CeTaskCharacteristics.BRANCH, branchName));
post.setParam(CHARACTERISTIC, buildCharacteristicParam(BRANCH_TYPE, branchConfiguration.branchType().name()));

Loading…
Cancel
Save