ignore nix/clean.sh failures when in CI

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-08-22 10:19:53 -04:00
parent 2e06dd36da
commit 2b34900a9b
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
1 changed files with 10 additions and 2 deletions

View File

@ -6,8 +6,16 @@ set -e
function cleanup() { function cleanup() {
# clear trapped signals # clear trapped signals
trap - EXIT ERR INT QUIT trap - EXIT ERR INT QUIT
# do the actual cleanup # do the actual cleanup, ignore failure
./nix/clean.sh "${nixResultPath}" if ./nix/clean.sh "${nixResultPath}"; then
echo "Successful cleanup!"
elif [[ -n "${JENKINS_URL}" ]]; then
# in CI removing some paths can fail due to parallel builds
echo "Ignoring cleanup failure in CI."
else
echo "Failed cleanup!"
exit 1
fi
} }
trap cleanup EXIT ERR INT QUIT trap cleanup EXIT ERR INT QUIT