Skip to content

Commit 27e0e91

Browse files
ci(java): restrict presubmit samples ITs to only snapshot (#804)
This is to reduce resource consumption since we often times hit resource quota limit in samples testing. e.g. googleapis/java-bigquerydatatransfer#410
1 parent c81691e commit 27e0e91

File tree

1 file changed

+9
-2
lines changed
  • synthtool/gcp/templates/java_library/.kokoro

1 file changed

+9
-2
lines changed

synthtool/gcp/templates/java_library/.kokoro/build.sh

+9-2
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,16 @@ integration)
6969
RETURN_CODE=$?
7070
;;
7171
samples)
72-
if [[ -f samples/pom.xml ]]
72+
SAMPLES_DIR=samples
73+
# only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise.
74+
if [[ ! -z ${KOKORO_GITHUB_PULL_REQUEST_NUMBER} ]]
7375
then
74-
pushd samples
76+
SAMPLES_DIR=samples/snapshot
77+
fi
78+
79+
if [[ -f ${SAMPLES_DIR}/pom.xml ]]
80+
then
81+
pushd {SAMPLES_DIR}
7582
mvn -B \
7683
-Penable-samples \
7784
-DtrimStackTrace=false \

0 commit comments

Comments
 (0)