Skip to content

Commit

Permalink
ci(java): restrict presubmit samples ITs to only snapshot
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

Source-Author: Stephanie Wang <stephaniewang526@users.noreply.github.com>
Source-Date: Thu Oct 15 17:16:14 2020 -0400
Source-Repo: googleapis/synthtool
Source-Sha: 27e0e916cbfdb3d5ff6639b686cc04f78a0b0386
Source-Link: googleapis/synthtool@27e0e91
  • Loading branch information
yoshi-automation committed Oct 15, 2020
1 parent 21a8020 commit 3b750ed
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions .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
4 changes: 2 additions & 2 deletions synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-cloud-bom.git",
"sha": "fe23054b7fa800eaa2479ac03b6806d33c4b7ffe"
"sha": "21a8020c2f77aadf7469c838cc5717e26d167ccc"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "b65ef07d99946d23e900ef2cc490274a16edd336"
"sha": "27e0e916cbfdb3d5ff6639b686cc04f78a0b0386"
}
}
],
Expand Down

0 comments on commit 3b750ed

Please sign in to comment.