Skip to content

Commit

Permalink
ci(java): restrict presubmit samples ITs to only snapshot (#804)
Browse files Browse the repository at this point in the history
This is to reduce resource consumption since we often times hit resource quota limit in samples testing.
e.g. googleapis/java-bigquerydatatransfer#410
  • Loading branch information
stephaniewang526 committed Oct 15, 2020
1 parent c81691e commit 27e0e91
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions synthtool/gcp/templates/java_library/.kokoro/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 27e0e91

Please sign in to comment.