From 9d168b85ae28b7162b1b5ee13d14b678e9b09503 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Thu, 15 Oct 2020 14:29:25 -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 dc7c14a6..bcb873b9 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 463a2c53..d3234367 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-dns.git", - "sha": "ff05830b9a1a0fb74a8ffb5100fb248785fcd3ed" + "sha": "daca1bc7d015f5b2a7844f757ffe08c37984b491" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "b65ef07d99946d23e900ef2cc490274a16edd336" + "sha": "27e0e916cbfdb3d5ff6639b686cc04f78a0b0386" } } ],