travis: Retry flaky apt update at build start

This commit is contained in:
Johan Bloemberg
2018-02-20 19:54:05 +01:00
parent f34ca3a5ca
commit cbd2bdd4c5

View File

@@ -9,7 +9,9 @@ go_import_path: github.com/purpleidea/mgmt
sudo: true sudo: true
dist: trusty dist: trusty
before_install: 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 config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
- git fetch --unshallow - git fetch --unshallow
install: 'make deps' install: 'make deps'