Skip to content

Commit 2210ebe

Browse files
committed
Remove coveralls integration and generate metadata for Sonarqube
1 parent b5d8ef8 commit 2210ebe

File tree

4 files changed

+15
-39
lines changed

4 files changed

+15
-39
lines changed

.buildkite/pipeline.yml

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ steps:
5252

5353
- label: ":java: Unit test with test services"
5454
artifact_paths:
55-
- "build/reports/jacoco/test/*.xml"
55+
- "build/reports/jacoco/test/jacocoTestReport.xml"
56+
- "build/reports/metadata.txt"
5657
timeout_in_minutes: 30
5758
retry:
5859
automatic:
@@ -68,6 +69,7 @@ steps:
6869
command:
6970
- |-
7071
./gradlew --no-daemon test jacocoTestReport
72+
.buildkite/scripts/coverage_metadata.sh build/reports/metadata.txt
7173
- docker-compose#v3.0.0:
7274
run: unit-test-test-service
7375
config: docker/buildkite/docker-compose.yaml
@@ -111,24 +113,3 @@ steps:
111113
- docker-compose#v3.0.0:
112114
run: unit-test-docker-sticky-off
113115
config: docker/buildkite/docker-compose.yaml
114-
115-
- wait
116-
117-
- label: ":java: Report test coverage"
118-
retry:
119-
automatic:
120-
- exit_status: "*"
121-
limit: 3
122-
plugins:
123-
- kubernetes:
124-
<<: *kubernetes
125-
podSpec:
126-
<<: *podSpec
127-
containers:
128-
- <<: *commandContainer
129-
command:
130-
- |-
131-
.buildkite/scripts/coverage.sh
132-
- docker-compose#v3.0.0:
133-
run: test-coverage-report
134-
config: docker/buildkite/docker-compose.yaml

.buildkite/scripts/coverage.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
set -ex
3+
# This script generates coverage metadata for the coverage report.
4+
# Output is used by SonarQube integration in Uber and not used by OS repo coverage tool itself.
5+
# Example output:
6+
# commit-sha: 6953daa563e8e44512bc349c9608484cfd4ec4ff
7+
# timestamp: 2024-03-04T19:29:16Z
8+
output_path="$1"
9+
echo "commit-sha: $(git rev-parse HEAD)" > "$output_path"
10+
echo "timestamp: $(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "$output_path"
11+
echo "Coverage metadata written to $output_path"

build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ buildscript {
77

88
plugins {
99
id "com.github.hierynomus.license" version"0.15.0"
10-
id 'com.github.nbaztec.coveralls-jacoco' version '1.2.15'
1110
id 'com.github.sherter.google-java-format' version '0.9'
1211
id 'net.ltgt.errorprone' version '1.1.1'
1312
id 'java-library'
@@ -362,7 +361,7 @@ jacoco {
362361
jacocoTestReport {
363362
dependsOn test
364363
reports {
365-
xml.enabled = true // coveralls plugin depends on xml format report
364+
xml.enabled = true
366365
html.enabled = true
367366
}
368367

0 commit comments

Comments
 (0)