aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-server-common
diff options
context:
space:
mode:
authorJacek <jacek.poreda@sonarsource.com>2022-09-27 14:04:38 +0200
committersonartech <sonartech@sonarsource.com>2022-09-28 20:04:08 +0000
commitbb3d825f81eff913d50e7e2773e6773387268233 (patch)
tree7cbdc902f5f5974a195f18338e30aa43ebaddd07 /server/sonar-server-common
parent5e7e46a917b4cf4f301701e5bb4455e98c9b4775 (diff)
downloadsonarqube-bb3d825f81eff913d50e7e2773e6773387268233.tar.gz
sonarqube-bb3d825f81eff913d50e7e2773e6773387268233.zip
SONAR-17195 Use "devopsPlatform" field name instead "alm" in telemetry
Diffstat (limited to 'server/sonar-server-common')
-rw-r--r--server/sonar-server-common/src/main/java/org/sonar/server/telemetry/TelemetryData.java10
-rw-r--r--server/sonar-server-common/src/main/java/org/sonar/server/telemetry/TelemetryDataJsonWriter.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/telemetry/TelemetryDataJsonWriterTest.java8
3 files changed, 10 insertions, 10 deletions
diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/telemetry/TelemetryData.java b/server/sonar-server-common/src/main/java/org/sonar/server/telemetry/TelemetryData.java
index 3f498118e9e..1f4cd508c6d 100644
--- a/server/sonar-server-common/src/main/java/org/sonar/server/telemetry/TelemetryData.java
+++ b/server/sonar-server-common/src/main/java/org/sonar/server/telemetry/TelemetryData.java
@@ -303,15 +303,15 @@ public class TelemetryData {
private final Long pullRequestCount;
private final String scm;
private final String ci;
- private final String alm;
+ private final String devopsPlatform;
- ProjectStatistics(String projectUuid, Long branchCount, Long pullRequestCount, @Nullable String scm, @Nullable String ci, @Nullable String alm) {
+ ProjectStatistics(String projectUuid, Long branchCount, Long pullRequestCount, @Nullable String scm, @Nullable String ci, @Nullable String devopsPlatform) {
this.projectUuid = projectUuid;
this.branchCount = branchCount;
this.pullRequestCount = pullRequestCount;
this.scm = scm;
this.ci = ci;
- this.alm = alm;
+ this.devopsPlatform = devopsPlatform;
}
public String getProjectUuid() {
@@ -337,8 +337,8 @@ public class TelemetryData {
}
@CheckForNull
- public String getAlm() {
- return alm;
+ public String getDevopsPlatform() {
+ return devopsPlatform;
}
}
}
diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/telemetry/TelemetryDataJsonWriter.java b/server/sonar-server-common/src/main/java/org/sonar/server/telemetry/TelemetryDataJsonWriter.java
index e8e6e186687..3bd3dda66e4 100644
--- a/server/sonar-server-common/src/main/java/org/sonar/server/telemetry/TelemetryDataJsonWriter.java
+++ b/server/sonar-server-common/src/main/java/org/sonar/server/telemetry/TelemetryDataJsonWriter.java
@@ -135,7 +135,7 @@ public class TelemetryDataJsonWriter {
json.prop("pullRequestCount", project.getPullRequestCount());
json.prop("scm", project.getScm());
json.prop("ci", project.getCi());
- json.prop("alm", project.getAlm());
+ json.prop("devopsPlatform", project.getDevopsPlatform());
json.endObject();
});
json.endArray();
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/telemetry/TelemetryDataJsonWriterTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/telemetry/TelemetryDataJsonWriterTest.java
index 31b5edd4601..8782cd1863b 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/telemetry/TelemetryDataJsonWriterTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/telemetry/TelemetryDataJsonWriterTest.java
@@ -348,7 +348,7 @@ public class TelemetryDataJsonWriterTest {
" \"pullRequestCount\": 2," +
" \"scm\": \"scm-0\"," +
" \"ci\": \"ci-0\"," +
- " \"alm\": \"alm-0\"" +
+ " \"devopsPlatform\": \"devops-0\"" +
" }," +
" {" +
" \"projectUuid\": \"uuid-1\"," +
@@ -356,7 +356,7 @@ public class TelemetryDataJsonWriterTest {
" \"pullRequestCount\": 4," +
" \"scm\": \"scm-1\"," +
" \"ci\": \"ci-1\"," +
- " \"alm\": \"alm-1\"" +
+ " \"devopsPlatform\": \"devops-1\"" +
" }," +
" {" +
" \"projectUuid\": \"uuid-2\"," +
@@ -364,7 +364,7 @@ public class TelemetryDataJsonWriterTest {
" \"pullRequestCount\": 6," +
" \"scm\": \"scm-2\"," +
" \"ci\": \"ci-2\"," +
- " \"alm\": \"alm-2\"" +
+ " \"devopsPlatform\": \"devops-2\"" +
" }" +
" ]" +
"}");
@@ -381,7 +381,7 @@ public class TelemetryDataJsonWriterTest {
}
private List<TelemetryData.ProjectStatistics> getProjectStats() {
- return IntStream.range(0, 3).mapToObj(i -> new TelemetryData.ProjectStatistics("uuid-" + i, (i + 1L) * 2L, (i + 1L) * 2L, "scm-" + i, "ci-" + i, "alm-" + i))
+ return IntStream.range(0, 3).mapToObj(i -> new TelemetryData.ProjectStatistics("uuid-" + i, (i + 1L) * 2L, (i + 1L) * 2L, "scm-" + i, "ci-" + i, "devops-" + i))
.collect(Collectors.toList());
}