From 61750004cd71143b6bedb735f19229b3df61200c Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 19 Oct 2018 15:55:20 -0700 Subject: [PATCH 1/2] Setup Kokoro to run codecov script after tests --- .kokoro/build.sh | 1 + .kokoro/continuous/common.cfg | 14 ++++++++++---- .kokoro/presubmit/common.cfg | 15 +++++++++++---- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 342c7692a26c..13e4bf27e214 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -31,6 +31,7 @@ fi case $JOB_TYPE in test) mvn test -B + bash $KOKORO_GFILE_DIR/codecov.sh ;; javadoc) mvn javadoc:javadoc javadoc:test-javadoc diff --git a/.kokoro/continuous/common.cfg b/.kokoro/continuous/common.cfg index 6a6b94a4cb4a..38724a8c1c58 100644 --- a/.kokoro/continuous/common.cfg +++ b/.kokoro/continuous/common.cfg @@ -28,8 +28,6 @@ before_action { keystore_resource { keystore_config_id: 73713 keyname: "java_it_service_account" - # TODO(chingor): remove this after secrets have globally propagated - backend_type: FASTCONFIGPUSH } } } @@ -39,8 +37,16 @@ before_action { keystore_resource { keystore_config_id: 73713 keyname: "java_firestore_it_service_account" - # TODO(chingor): remove this after secrets have globally propagated - backend_type: FASTCONFIGPUSH + } + } +} + +# Request the codecov master token +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "dpebot_codecov_token" } } } diff --git a/.kokoro/presubmit/common.cfg b/.kokoro/presubmit/common.cfg index 6a6b94a4cb4a..772a5bee1b2f 100644 --- a/.kokoro/presubmit/common.cfg +++ b/.kokoro/presubmit/common.cfg @@ -28,8 +28,6 @@ before_action { keystore_resource { keystore_config_id: 73713 keyname: "java_it_service_account" - # TODO(chingor): remove this after secrets have globally propagated - backend_type: FASTCONFIGPUSH } } } @@ -39,8 +37,17 @@ before_action { keystore_resource { keystore_config_id: 73713 keyname: "java_firestore_it_service_account" - # TODO(chingor): remove this after secrets have globally propagated - backend_type: FASTCONFIGPUSH } } } + +# Request the codecov master token +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "dpebot_codecov_token" + } + } +} + From 008b19fcf64869c9bfad75d8add7b66e76a00cf6 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 19 Oct 2018 15:59:27 -0700 Subject: [PATCH 2/2] Enable jacoco plugin to capture code coverage in clients --- codecov.yaml | 4 ++++ google-api-grpc/pom.xml | 19 +++++++++++++++++++ google-cloud-bom/pom.xml | 19 +++++++++++++++++++ google-cloud-clients/pom.xml | 19 +++++++++++++++++++ 4 files changed, 61 insertions(+) create mode 100644 codecov.yaml diff --git a/codecov.yaml b/codecov.yaml new file mode 100644 index 000000000000..5724ea9478d7 --- /dev/null +++ b/codecov.yaml @@ -0,0 +1,4 @@ +--- +codecov: + ci: + - source.cloud.google.com diff --git a/google-api-grpc/pom.xml b/google-api-grpc/pom.xml index c87df227d158..b42e62a2a8a0 100644 --- a/google-api-grpc/pom.xml +++ b/google-api-grpc/pom.xml @@ -788,6 +788,25 @@ + + org.jacoco + jacoco-maven-plugin + 0.8.2 + + + + prepare-agent + + + + report + test + + report + + + + diff --git a/google-cloud-bom/pom.xml b/google-cloud-bom/pom.xml index fd748f4328bb..d36f1f9d4549 100644 --- a/google-cloud-bom/pom.xml +++ b/google-cloud-bom/pom.xml @@ -1153,6 +1153,25 @@ + + org.jacoco + jacoco-maven-plugin + 0.8.2 + + + + prepare-agent + + + + report + test + + report + + + + diff --git a/google-cloud-clients/pom.xml b/google-cloud-clients/pom.xml index c8622d9a35ac..d687c6828946 100644 --- a/google-cloud-clients/pom.xml +++ b/google-cloud-clients/pom.xml @@ -765,6 +765,25 @@ + + org.jacoco + jacoco-maven-plugin + 0.8.2 + + + + prepare-agent + + + + report + test + + report + + + +