Skip to content

Commit 76309cf

Browse files
nrmancusornveach
authored andcommitted
Issue #7892: add empty .ci-temp validation
1 parent bdd2a47 commit 76309cf

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

.ci/wercker.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,19 @@ no-warning-imports-java-design-patterns)
447447
fi
448448
;;
449449

450+
validate-ci-temp-empty)
451+
fail=0
452+
if [ -z "$(ls -A .ci-temp)" ]; then
453+
echo "Empty .ci-temp/ validation did not find any warnings."
454+
else
455+
echo "Directory .ci-temp/ is not empty. Verification failed."
456+
echo "Contents of .ci-temp/:"
457+
fail=1
458+
fi
459+
ls -A .ci-temp --color=auto
460+
exit $fail
461+
;;
462+
450463
*)
451464
echo "Unexpected argument: $1"
452465
sleep 5s

wercker.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,15 +334,22 @@ build:
334334
echo "build is skipped ..."
335335
fi
336336
337+
- script:
338+
name: Empty .ci-temp validation
339+
code: |
340+
if [[ $RUN_JOB == 1 ]]; then
341+
echo "Command: ./.ci/wercker.sh validate-ci-temp-empty"
342+
./.ci/wercker.sh validate-ci-temp-empty
343+
else
344+
echo "build is skipped ..."
345+
fi
346+
337347
- script:
338348
name: Cleanup maven local repo
339349
code: |
340350
echo "git status"
341351
git status
342352
echo "------"
343-
echo "Content of .ci-temp folder:"
344-
ls -la .ci-temp | cat
345-
echo "------"
346353
find ${WERCKER_CACHE_DIR} -type d -name "*SNAPSHOT" -ls -exec rm -rf {} +
347354
echo "------"
348355
du -hs ${WERCKER_CACHE_DIR}

0 commit comments

Comments
 (0)