From 7692e114da5988cec7d222e05445be88b1131252 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Thu, 15 Oct 2020 14:48:11 -0700 Subject: [PATCH] ci(java): restrict presubmit samples ITs to only snapshot This is to reduce resource consumption since we often times hit resource quota limit in samples testing. e.g. https://github.com/googleapis/java-bigquerydatatransfer/issues/410 Source-Author: Stephanie Wang Source-Date: Thu Oct 15 17:16:14 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 27e0e916cbfdb3d5ff6639b686cc04f78a0b0386 Source-Link: https://github.com/googleapis/synthtool/commit/27e0e916cbfdb3d5ff6639b686cc04f78a0b0386 --- .kokoro/build.sh | 11 +++++++++-- synth.metadata | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 5e62108af..d70e8ad92 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -69,9 +69,16 @@ integration) RETURN_CODE=$? ;; samples) - if [[ -f samples/pom.xml ]] + SAMPLES_DIR=samples + # only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise. + if [[ ! -z ${KOKORO_GITHUB_PULL_REQUEST_NUMBER} ]] then - pushd samples + SAMPLES_DIR=samples/snapshot + fi + + if [[ -f ${SAMPLES_DIR}/pom.xml ]] + then + pushd {SAMPLES_DIR} mvn -B \ -Penable-samples \ -DtrimStackTrace=false \ diff --git a/synth.metadata b/synth.metadata index 0c5b18368..d1aacb5cf 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-api-java-client.git", - "sha": "df9215705edb77906f2ff5838c3a52e2376cee5f" + "sha": "e395ed9bae57fe343225553850ff92c2c20cdaff" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "b65ef07d99946d23e900ef2cc490274a16edd336" + "sha": "27e0e916cbfdb3d5ff6639b686cc04f78a0b0386" } } ],