Skip to content

Commit b9ed812

Browse files
committed
ci: use travis_terminate to handle script shutdown gracefully and prevent logs truncation.
See https://travis-ci.community/t/log-are-truncated-when-my-script-exits-abnormally/5878 Correction for 747486a commit.
1 parent d356f73 commit b9ed812

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.travis.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,15 @@ jobs:
1515
allow_failures:
1616
- env: SPRING_PROFILES_ACTIVE=postgres
1717

18-
# set -e is needed to fail fast. See https://github.com/travis-ci/travis-ci/issues/10480
18+
# * set -e is needed to fail fast.
19+
# See https://github.com/travis-ci/travis-ci/issues/10480
20+
# * travis_terminate allows us to gracefully handle "set -e" shutdown.
21+
# See https://travis-ci.community/t/log-are-truncated-when-my-script-exits-abnormally/5878
22+
#
1923
# @todo #1054 Unify PostgreSQL version/configuration between Travis and docker-compose
2024
before_script:
21-
- set -e;
25+
- trap 'travis_terminate 1' ERR;
26+
set -e;
2227
if [ "$SPRING_PROFILES_ACTIVE" = 'travis' ]; then
2328
mysql -u root -e 'CREATE DATABASE mystamps CHARACTER SET utf8;';
2429
mkdir -p /tmp/uploads /tmp/preview;

0 commit comments

Comments
 (0)