]> git.donarmstrong.com Git - neurodebian.git/blob - tools/neurodebian-travis.sh
Also for stats report which repo and which job number use our setup
[neurodebian.git] / tools / neurodebian-travis.sh
1 #!/bin/bash
2
3 # A universal helper to enable NeuroDebian repository for a travis
4 # environment.
5 #
6 # Its purpose to remove all repetative actions from various .travis.yml spread
7 # across projects and gain control in the future to point  to an alternative,
8 # more appropriate for travis deployments, mirror.
9
10 # for the protocol
11 set -xe
12
13 # Update packaging
14 sudo apt-get update -qq
15
16 # To troubleshoot failing connections to neurodebian
17 sudo apt-get install net-tools traceroute coreutils
18 sudo traceroute -T neuro.debian.net
19 echo "Request non-existing uniq file to ease tracking this connection (for troubleshooting)"
20 echo "Date: `date`     Seed: $rseed"
21 rseed=$RANDOM
22 wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh-$RANDOM-repo:$TRAVIS_REPO_SLUG-job:$TRAVIS_JOB_NUMBER || :
23
24 # Figure out what Ubuntu release travis environment is based on
25 sudo apt-get install lsb-release
26 cat /etc/lsb-release
27 source /etc/lsb-release
28
29 # Fetch the apt sources for the currently preferred mirror
30 wget -O- http://neuro.debian.net/lists/${DISTRIB_CODENAME}.us-nh.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
31 wget -O- http://neuro.debian.net/lists/${DISTRIB_CODENAME}.de-md.full | sudo tee -a /etc/apt/sources.list.d/neurodebian.sources.list
32 sudo apt-key adv --recv-keys --keyserver pgp.mit.edu 2649A5A9 \
33  || { wget -q -O- http://neuro.debian.net/_static/neuro.debian.net.asc | sudo apt-key add -; }
34 sudo apt-get update -qq
35
36 # And provide a summary over which repositories are currently available
37 sudo apt-cache policy           # What is actually available?