Skip to content

Commit 75a9313

Browse files
committed
Remove coveralls integration and generate metadata for Sonarqube
1 parent b5d8ef8 commit 75a9313

File tree

6 files changed

+16
-69
lines changed

6 files changed

+16
-69
lines changed

.buildkite/pipeline.yml

+3-22
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

-15
This file was deleted.
+11
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"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Java framework for Cadence [![Build Status](https://badge.buildkite.com/0c96b8b74c0921208e898c10a602e2fe9ecb7641c2befee0e7.svg?theme=github&branch=master)](https://buildkite.com/uberopensource/cadence-java-client) [![Javadocs](https://www.javadoc.io/badge/com.uber.cadence/cadence-client.svg)](https://www.javadoc.io/doc/com.uber.cadence/cadence-client) [![Coverage Status](https://coveralls.io/repos/github/uber/cadence-java-client/badge.svg)](https://coveralls.io/github/uber/cadence-java-client)
1+
# Java framework for Cadence [![Build Status](https://badge.buildkite.com/0c96b8b74c0921208e898c10a602e2fe9ecb7641c2befee0e7.svg?theme=github&branch=master)](https://buildkite.com/uberopensource/cadence-java-client) [![Javadocs](https://www.javadoc.io/badge/com.uber.cadence/cadence-client.svg)](https://www.javadoc.io/doc/com.uber.cadence/cadence-client) [![codecov](https://codecov.io/gh/uber/cadence-java-client/graph/badge.svg?token=eVBGf4EmXr)](https://codecov.io/gh/uber/cadence-java-client)
22

33

44
[Cadence](https://github.com/uber/cadence) is a distributed, scalable, durable, and highly available orchestration engine we developed at Uber Engineering to execute asynchronous long-running business logic in a scalable and resilient way.

build.gradle

+1-2
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

docker/buildkite/docker-compose.yaml

-29
Original file line numberDiff line numberDiff line change
@@ -93,32 +93,3 @@ services:
9393
- "USE_DOCKER_SERVICE=false"
9494
volumes:
9595
- "../../:/cadence-java-client"
96-
97-
test-coverage-report:
98-
build:
99-
context: ../../
100-
dockerfile: ./docker/buildkite/Dockerfile
101-
command: "./gradlew --no-daemon test"
102-
environment:
103-
- "USER=unittest"
104-
- "USE_DOCKER_SERVICE=false"
105-
- CI
106-
- BUILDKITE
107-
- BUILDKITE_AGENT_ACCESS_TOKEN
108-
- BUILDKITE_JOB_ID
109-
- BUILDKITE_BUILD_ID
110-
- BUILDKITE_BUILD_NUMBER
111-
- BUILDKITE_BRANCH
112-
- BUILDKITE_BUILD_URL
113-
- BUILDKITE_PROJECT_SLUG
114-
- BUILDKITE_COMMIT
115-
- BUILDKITE_PULL_REQUEST
116-
- BUILDKITE_TAG
117-
- BUILDKITE_REPO
118-
- BUILDKITE_BUILD_CREATOR
119-
- BUILDKITE_BUILD_CREATOR_EMAIL
120-
- BUILDKITE_BUILD_CREATOR_TEAMS
121-
- BUILDKITE_PULL_REQUEST_REPO
122-
- COVERALLS_REPO_TOKEN
123-
volumes:
124-
- "../../:/cadence-java-client"

0 commit comments

Comments
 (0)