Skip to content

Commit

Permalink
travis: Use a wrapper script for installing moreutils.
Browse files Browse the repository at this point in the history
This works around a frequent problem we've been having with Travis
CI's apt repository being busted on startup.  This, in turn, caused
`apt-get install moreutils` to fail.

We attempt to fix this by adding our own retry logic.
  • Loading branch information
timabbott committed Jul 12, 2017
1 parent 6100d43 commit 344af2a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# See https://zulip.readthedocs.io/en/latest/events-system.html for
# high-level documentation on our Travis CI setup.
dist: trusty
before_install:
- sudo apt-get install moreutils # To use 'ts' and 'mispipe' for timing logs.
install:
# Install moreutils so we can use `ts` and `mispipe` in the following.
- sudo ./tools/travis/install-moreutils

# Disable Travis CI's built-in NVM installation
- mispipe "mv ~/.nvm ~/.travis-nvm-disabled" ts

Expand Down
8 changes: 8 additions & 0 deletions tools/travis/install-moreutils
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -x

sudo apt-get install moreutils || (
echo "Error trying to install moreutils; retrying after apt update"
sudo apt-get update
sudo apt-get install moreutils
)

0 comments on commit 344af2a

Please sign in to comment.