forked from sni/Thruk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
110 lines (108 loc) · 3.5 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
sudo: required
dist: xenial
language: generic
services:
- docker
- mysql
addons:
apt:
packages:
- debhelper
- lsb-release
- chrpath
- rsync
- perl
- perl-doc
- libperl-dev
- cpanminus
- phantomjs
- tofrodos
- apache2
- apache2-utils
- libgd2-xpm-dev
- libmysqlclient-dev
- libpng12-dev
- libjpeg8-dev
- zlib1g-dev
- libmodule-install-perl
- libcpanel-json-xs-perl
- libfcgi-perl
- libnet-http-perl
- libsocket-perl
- libio-socket-ip-perl
- libgd-gd2-perl
- libtemplate-perl
- libdate-calc-perl
- libfile-slurp-perl
- libdate-manip-perl
- libdatetime-timezone-perl
- libdatetime-perl
- libexcel-template-perl
- libio-string-perl
- liblog-log4perl-perl
- libmime-lite-perl
- libclass-inspector-perl
- libdbi-perl
- libdbd-mysql-perl
- libtest-simple-perl
- libhtml-lint-perl
- libfile-bom-perl
- libtest-cmd-perl
- libtest-pod-perl
- libperl-critic-perl
- libtest-perl-critic-perl
- libtest-pod-coverage-perl
- libdevel-cycle-perl
- libpadwalker-perl
- libmodule-build-tiny-perl
- libsub-uplevel-perl
- libextutils-helpers-perl
- libextutils-config-perl
- libextutils-installpaths-perl
- libtest-requires-perl
- libhttp-message-perl
before_install:
- sudo sh -c "echo 'deb http://labs.consol.de/repo/stable/ubuntu $(lsb_release -cs) main' >> /etc/apt/sources.list"
- wget -q "http://labs.consol.de/repo/stable/RPM-GPG-KEY" -O - | sudo apt-key add -
- sudo apt-get update
- sudo apt-get -y install naemon-core naemon-livestatus
- sudo /etc/init.d/naemon restart
- sudo chmod 660 /var/cache/naemon/live
- sudo gpasswd -a $(id -un) naemon
- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
# newer version are broken when using symlinks
- cpanm -n http://search.cpan.org/CPAN/authors/id/F/FL/FLORA/ExtUtils-Manifest-1.63.tar.gz
- sed -i '/Test::JavaScript/d' ./Makefile.PL
- cpanm -q -f --installdeps --notest --no-man-pages .
# required for plugins test
- cpanm -q -f --notest --no-man-pages Spreadsheet/ParseExcel.pm
- git config --global user.email "travis@localhost"
- git config --global user.name "Travis Testuser"
- echo "export PERL5LIB=\$PERL5LIB:$HOME/perl5/lib/perl5" > ~/.thruk
# ensure we have a test database in place for tests
- mysql -e "create database IF NOT EXISTS test;" -uroot
# ensure we have all modules loaded
- if [ $(perl Makefile.PL 2>&1 | grep -c missing) -ne 0 ]; then exit 1; fi
- '[ "$TRAVIS_BRANCH" != "e2e" -o "$TRAVIS_SECURE_ENV_VARS" == "false" ] || openssl aes-256-cbc -K $encrypted_9c186b83851c_key -iv $encrypted_9c186b83851c_iv -in t/scenarios/e2e/.dropbox_uploader.enc -out ~/.dropbox_uploader -d'
install:
- ./configure || exit 1
- make || exit 1
- cp t/travis/thruk_local.conf .
- touch .author
script:
- if [ "$TRAVIS_BRANCH" == "e2e" ]; then
make e2etest;
else
sudo su $(id -un) -c 'eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) && TEST_TRAVIS=1 TEST_AUTHOR=1 TEST_MYSQL="mysql://root@localhost:3306/test" make test';
fi
after_failure:
- '[ "$TRAVIS_BRANCH" != "e2e" -o ! -f ~/.dropbox_uploader ] || ./t/scenarios/e2e/dropbox_uploader.sh upload t/scenarios/e2e/_run/*/* thruk-travis/$TRAVIS_JOB_NUMBER/'
notifications:
email:
irc:
channels:
- "chat.freenode.net#thruk-dev"
on_success: change
on_failure: always
skip_join: true