Skip to content

Commit

Permalink
Remove coveralls integration and generate metadata for Sonarqube (#952)
Browse files Browse the repository at this point in the history
  • Loading branch information
natemort authored Nov 7, 2024
1 parent 83968cd commit 2332262
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 69 deletions.
25 changes: 3 additions & 22 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ steps:

- label: ":java: Unit test with test services"
artifact_paths:
- "build/reports/jacoco/test/*.xml"
- "build/reports/jacoco/test/jacocoTestReport.xml"
- "build/reports/metadata.txt"
timeout_in_minutes: 30
retry:
automatic:
Expand All @@ -68,6 +69,7 @@ steps:
command:
- |-
./gradlew --no-daemon test jacocoTestReport
.buildkite/scripts/coverage_metadata.sh build/reports/metadata.txt
- docker-compose#v3.0.0:
run: unit-test-test-service
config: docker/buildkite/docker-compose.yaml
Expand Down Expand Up @@ -111,24 +113,3 @@ steps:
- docker-compose#v3.0.0:
run: unit-test-docker-sticky-off
config: docker/buildkite/docker-compose.yaml

- wait

- label: ":java: Report test coverage"
retry:
automatic:
- exit_status: "*"
limit: 3
plugins:
- kubernetes:
<<: *kubernetes
podSpec:
<<: *podSpec
containers:
- <<: *commandContainer
command:
- |-
.buildkite/scripts/coverage.sh
- docker-compose#v3.0.0:
run: test-coverage-report
config: docker/buildkite/docker-compose.yaml
15 changes: 0 additions & 15 deletions .buildkite/scripts/coverage.sh

This file was deleted.

11 changes: 11 additions & 0 deletions .buildkite/scripts/coverage_metadata.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
set -ex
# This script generates coverage metadata for the coverage report.
# Output is used by SonarQube integration in Uber and not used by OS repo coverage tool itself.
# Example output:
# commit-sha: 6953daa563e8e44512bc349c9608484cfd4ec4ff
# timestamp: 2024-03-04T19:29:16Z
output_path="$1"
echo "commit-sha: $(git rev-parse HEAD)" > "$output_path"
echo "timestamp: $(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "$output_path"
echo "Coverage metadata written to $output_path"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 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)
# 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)


[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.
Expand Down
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ buildscript {

plugins {
id "com.github.hierynomus.license" version"0.15.0"
id 'com.github.nbaztec.coveralls-jacoco' version '1.2.15'
id 'com.github.sherter.google-java-format' version '0.9'
id 'net.ltgt.errorprone' version '1.1.1'
id 'java-library'
Expand Down Expand Up @@ -362,7 +361,7 @@ jacoco {
jacocoTestReport {
dependsOn test
reports {
xml.enabled = true // coveralls plugin depends on xml format report
xml.enabled = true
html.enabled = true
}

Expand Down
29 changes: 0 additions & 29 deletions docker/buildkite/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,32 +93,3 @@ services:
- "USE_DOCKER_SERVICE=false"
volumes:
- "../../:/cadence-java-client"

test-coverage-report:
build:
context: ../../
dockerfile: ./docker/buildkite/Dockerfile
command: "./gradlew --no-daemon test"
environment:
- "USER=unittest"
- "USE_DOCKER_SERVICE=false"
- CI
- BUILDKITE
- BUILDKITE_AGENT_ACCESS_TOKEN
- BUILDKITE_JOB_ID
- BUILDKITE_BUILD_ID
- BUILDKITE_BUILD_NUMBER
- BUILDKITE_BRANCH
- BUILDKITE_BUILD_URL
- BUILDKITE_PROJECT_SLUG
- BUILDKITE_COMMIT
- BUILDKITE_PULL_REQUEST
- BUILDKITE_TAG
- BUILDKITE_REPO
- BUILDKITE_BUILD_CREATOR
- BUILDKITE_BUILD_CREATOR_EMAIL
- BUILDKITE_BUILD_CREATOR_TEAMS
- BUILDKITE_PULL_REQUEST_REPO
- COVERALLS_REPO_TOKEN
volumes:
- "../../:/cadence-java-client"

0 comments on commit 2332262

Please sign in to comment.