Skip to content

Commit 2cd3e2b

Browse files
ci(java): restrict presubmit samples ITs to only snapshot (#1148)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/dc44c73a-e60a-4f22-9d87-3a3f6d9d4115/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: googleapis/synthtool@27e0e91
1 parent f4f68a4 commit 2cd3e2b

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.kokoro/build.sh

Lines changed: 9 additions & 2 deletions
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 \

synth.metadata

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/google-http-java-client.git",
7-
"sha": "0c1d58b14a2b38cb2bce8d17c4b547261ab17739"
7+
"sha": "f4f68a43c33b0336239b0af3ac4e6c0746189821"
88
}
99
},
1010
{
1111
"git": {
1212
"name": "synthtool",
1313
"remote": "https://github.com/googleapis/synthtool.git",
14-
"sha": "b65ef07d99946d23e900ef2cc490274a16edd336"
14+
"sha": "27e0e916cbfdb3d5ff6639b686cc04f78a0b0386"
1515
}
1616
}
1717
],

0 commit comments

Comments
 (0)