From cbd2bdd4c51c1f59cc10e60d1fe478f7c58bbde6 Mon Sep 17 00:00:00 2001 From: Johan Bloemberg Date: Tue, 20 Feb 2018 19:54:05 +0100 Subject: [PATCH] travis: Retry flaky apt update at build start --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c70cd66b..5087d3df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,9 @@ go_import_path: github.com/purpleidea/mgmt sudo: true dist: trusty before_install: - - if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then sudo apt update; fi + # apt update tends to be flaky in travis, retry up to 3 times on failure + # https://docs.travis-ci.com/user/common-build-problems/#travis_retry + - if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then travis_retry sudo apt update; fi - git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" - git fetch --unshallow install: 'make deps'