Skip to content

Commit c18ccc3

Browse files
authored
Update int.cloudbuild.yaml
1 parent ab977b0 commit c18ccc3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build/int.cloudbuild.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ steps:
3535
cat _changed_folders
3636
3737
# Do not prune if changing tests themselves
38-
_INFRA_FOLDERS="build/ test/ .github/" # TODO: fix build/, remove github?
38+
_INFRA_FOLDERS="build/ test/"
3939
for d in _changed_folders; do
4040
if [[ "${_INFRA_FOLDERS}" =~ "$d" ]]; then
4141
echo "Infrastructure folders have changed; no tests will be pruned."
@@ -46,7 +46,7 @@ steps:
4646
# Remove leaf folders without changes
4747
# TODO: Handle intermeidate folders that also contain .tf
4848
for d in `find . -type d -name 'test' -prune -o -links 2 -printf '%P\n'`; do
49-
if ! grep -q "^$d" _changed_folders; then
49+
if ! grep -q "^$d" _changed_folders && [ -n "$(find . -maxdepth 1 -name '*.tf' -type f -print -quit) $d" ]; then
5050
rm -rf $d;
5151
fi
5252
done

0 commit comments

Comments
 (0)