From 0ec00166969f38b57508f572b7e45bcaec57f6d9 Mon Sep 17 00:00:00 2001 From: Eric Lorenzana Date: Wed, 5 Apr 2023 12:12:31 +0200 Subject: [PATCH] BUILD-2798 Move `after_failure` expressions to condition I misunderstood the provided workaround by Travis. The contents of `after_failure` body will not be evaluated now in case of failure. This is a temporary change. --- .travis.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9ef01466819..43f37395b39 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,10 +37,8 @@ notifications: secure: PCekbN71ZmuOt82JUFmlhzxlx3wrXucSIpvxxWdZn9lfsPYQAtXCoOESaHjIVIpggsC5HSAic3HiedsWbuDk/XojmPrDCrfjgYG2wiuSuQlAa60WvzTPqXdRmUXyMQgItaAQbRfZP7kN9No/v8TZDfg5kT3i9ewy0bsfExpjAuo= on_start: always -after_success: - - "[[ $TRAVIS_TEST_RESULT = 0 ]] && echo passed" - +# This is a temporary change as Travis is currently executing this body even +# when TRAVIS_TEST_RESULT=0 (support ticket #44617). +# The changes should be reverted once we have a proper solution. after_failure: - - "[[ $TRAVIS_TEST_RESULT = 1 ]] && echo failed" - - source ./.travis/setup_environment.sh - - notify_burgr "build" "build" "$TRAVIS_JOB_WEB_URL" "$(cat /tmp/build_start_time)" "$(date --utc +%FT%TZ)" "failed" || true + - "[[ $TRAVIS_TEST_RESULT = 1 ]] && source ./.travis/setup_environment.sh && notify_burgr \"build\" \"build\" \"$TRAVIS_JOB_WEB_URL\" \"$(cat /tmp/build_start_time)\" \"$(date --utc +%FT%TZ)\" \"failed\" || true" -- 2.39.5