Skip to content

Commit d86a6bb

Browse files
committed
preserve logic for skipping snapshot PRs
1 parent 6c9f392 commit d86a6bb

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

.kokoro/build.sh

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ case ${JOB_TYPE} in
8484
;;
8585
integration-single)
8686
generate_modified_modules_list false
87-
if [[ ! " ${modified_module_list[*]} " =~ " ${BUILD_SUBDIR} " ]]; then
87+
if [[ "$(release_please_snapshot_pull_request)" == "true" ]]; then
88+
echo "Not running integration checks -- this is Release Please SNAPSHOT pull request."
89+
elif [[ ! " ${modified_module_list[*]} " =~ " ${BUILD_SUBDIR} " ]]; then
8890
echo "${BUILD_SUBDIR} not modified, skipping split integration test"
8991
else
9092
echo "${BUILD_SUBDIR} modified, running split integration test"
@@ -141,7 +143,9 @@ case ${JOB_TYPE} in
141143
;;
142144
graalvm-single)
143145
generate_modified_modules_list false
144-
if [[ ! " ${modified_module_list[*]} " =~ " ${BUILD_SUBDIR} " ]]; then
146+
if [[ "$(release_please_snapshot_pull_request)" == "true" ]]; then
147+
echo "Not running GraalVM checks -- this is Release Please SNAPSHOT pull request."
148+
elif [[ ! " ${modified_module_list[*]} " =~ " ${BUILD_SUBDIR} " ]]; then
145149
echo "${BUILD_SUBDIR} not modified, skipping split GraalVM test"
146150
else
147151
echo "${BUILD_SUBDIR} modified, running split GraalVM test"
@@ -168,6 +172,13 @@ case ${JOB_TYPE} in
168172
fi
169173
;;
170174
lint)
175+
if [[ -n "${BUILD_SUBDIR}" ]]
176+
then
177+
echo "Compiling and building all modules for ${BUILD_SUBDIR}"
178+
install_modules "${BUILD_SUBDIR}"
179+
echo "Running in subdir: ${BUILD_SUBDIR}"
180+
pushd "${BUILD_SUBDIR}"
181+
fi
171182
if [ -n "${BASE_SHA}" ] && [ -n "${HEAD_SHA}" ]; then
172183
changed_file_list=$(git diff --name-only "${BASE_SHA}" "${HEAD_SHA}")
173184
echo "${changed_file_list}"
@@ -195,6 +206,12 @@ case ${JOB_TYPE} in
195206
-T 1.5C \
196207
com.spotify.fmt:fmt-maven-plugin:check
197208
mvn -B -ntp checkstyle:check@checkstyle
209+
210+
if [[ -n "${BUILD_SUBDIR}" ]]
211+
then
212+
echo "restoring directory"
213+
popd
214+
fi
198215
;;
199216
*) ;;
200217

0 commit comments

Comments
 (0)