forked from alisw/ali-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
78 lines (78 loc) · 3.05 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
sudo: required
cache:
directories:
- $HOME/cached
script:
- |
git diff --name-only $TRAVIS_COMMIT_RANGE | grep -q ^riemann || return 0
curl -O https://aphyr.com/riemann/riemann-0.2.11.tar.bz2
tar xjvf riemann-0.2.11.tar.bz2
riemann-0.2.11/bin/riemann test riemann/riemann.config
- |
git diff --name-only $TRAVIS_COMMIT_RANGE | grep -q ^logstash/ || return 0
set -ex
wget -qO - https://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb http://packages.elasticsearch.org/logstash/2.3/debian stable main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update && sudo apt-get install logstash
sudo /opt/logstash/bin/logstash-plugin install logstash-input-http_poller
sudo /opt/logstash/bin/logstash-plugin install logstash-filter-prune
sudo /opt/logstash/bin/logstash-plugin install logstash-output-riemann
/opt/logstash/bin/logstash --configtest -f logstash/
- |
git diff --name-only $TRAVIS_COMMIT_RANGE | grep -q ^publish/ || return 0
pushd publish
for CONF in aliPublish*.conf; do
TEST=${CONF/aliPublish/test}
TEST=${TEST/.conf/.yaml}
[[ -r $TEST ]] || continue
./aliPublish test-rules --conf $CONF --test-conf $TEST --debug || { echo Testing $CONF against $TEST failed. >&2 ; return 1; }
done
popd
- |
git diff --name-only $TRAVIS_COMMIT_RANGE | grep -q ^cvmfs/ || return 0
set -ex
# Install and configure an old bash
function get_bash() {
rm -rf $HOME/cached $HOME/scratch
mkdir -p $HOME/cached $HOME/scratch
pushd $HOME/scratch
wget -q https://ftp.gnu.org/gnu/bash/bash-3.2.48.tar.gz
tar xzf bash-3.2.48.tar.gz
pushd bash-3.2.48
./configure --prefix=$HOME/cached
make -j4
make install
popd
popd
}
$HOME/cached/bin/bash --version || get_bash
# Patch alienv and make it use our own, old, bash
pushd cvmfs
sed -i.deleteme -e "1 s|^#!/bin/bash\(.*\)$|#!$HOME/cached/bin/bash\1|" alienv
rm -f *.deleteme
git diff
popd
# Install and configure CVMFS
URL=https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest_all.deb
wget -q $URL || ERR=$?
[[ $ERR == 5 ]] && wget --no-check-certificate -q $URL
unset ERR
unset URL
sudo dpkg -i cvmfs-release-latest_all.deb
rm -f cvmfs-release-latest_all.deb
sudo apt-get update
sudo apt-get install cvmfs-dev cvmfs libtcl8.5 libx11-6
sudo mkdir -p /cvmfs/alice.cern.ch
sudo chown -R cvmfs:cvmfs /cvmfs
sudo bash -c 'echo CVMFS_HTTP_PROXY=DIRECT > /etc/cvmfs/default.local'
sudo mount alice.cern.ch /cvmfs/alice.cern.ch -t cvmfs -o allow_other,grab_mountpoint
ls -l /cvmfs/alice.cern.ch
# Override remote alienv with ours
md5sum /cvmfs/alice.cern.ch/bin/alienv
md5sum $PWD/cvmfs/alienv
sudo mount --bind $PWD/cvmfs/alienv /cvmfs/alice.cern.ch/bin/alienv
md5sum /cvmfs/alice.cern.ch/bin/alienv
cmp /cvmfs/alice.cern.ch/bin/alienv $PWD/cvmfs/alienv
# Run the actual test
cvmfs/test-alienv.sh