forked from HariSekhon/Nagios-Plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
169 lines (142 loc) · 5.13 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# vim:ts=2:sts=2:sw=2:et
#
# Author: Hari Sekhon
# Date: 2014-11-29 01:02:47 +0000 (Sat, 29 Nov 2014)
#
# https://github.com/harisekhon/nagios-plugins
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback
# to help improve or steer this or other code I publish
#
# http://www.linkedin.com/in/harisekhon
#
version: ~> 1.0
matrix:
include:
- os: linux
language: perl
# this build has thread support
perl: "5.24-shrplib"
- os: osx
language: perl
perl:
# this build has thread support
- "5.24-shrplib"
# matrix include doesn't seem to build the later perl array items for 5.10, so use a separate include for them
#- os: linux
# language: perl
# perl:
# latest Redis cpan module requires Perl >= 5.10
# - "5.10"
# there is workaround in build now to install older version if latest fails for RHEL5/CentOS5 servers
# other CPAN modules are broken for Perl 5.8, re-visit
#- "5.8"
- os: osx
language: perl
perl:
- "5.24"
- os: linux
language: python
# numpy has gone 2.7+ only now
python: "2.7"
- os: linux
language: python
python: "3.6"
- os: linux
language: python
python: "pypy"
- os: linux
language: python
python: "pypy3"
- os: linux
language: generic
# Travis CI doesn't support Python virtual envs on Mac OS X yet, workaround is to use generic and install to system python
# results in a duplicate matrix multiplier giving 2 x osx generic
- os: osx
language: generic
allow_failures:
- os: osx
- language: generic
#- python: "pypy"
#- python: "pypy3"
#os:
# - linux
# - osx
#dist: trusty
sudo: required
notifications:
email: false
branches:
only:
- master
env:
- DOCKER_COMPOSE_VERSION=1.16.1 PYTHONUNBUFFERED=1 PYTHON_USER_INSTALL=1
before_install:
- sudo rm -f /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
# avoid package checksum mismatches when installing packages
- sudo rm -f "${TRAVIS_ROOT}/etc/apt/apt.conf.d/99-travis-apt-proxy"
- sudo rm -rf "${TRAVIS_ROOT}/var/lib/apt/lists/"*
# after_failure doesn't trigger from install failure
# perlbrew and cpanm are not installed without an install section
# using script section will trigger "after_failure" section but this runs everything regardless of failures
# script:
install:
#- pushd lib
#- make apt-packages
#- cpanm --installdeps --notest . || echo CPANM LIB FAILED
#- popd
#- make apt-packages
#- cpanm --installdeps --notest . || echo CPANM FAILED
# integrated cpanm in to core Makefiles
# workaround for strange error when building pylib submodule, /usr/local/lib/python2.7, /usr/local/man, /usr/lib/python2.7 etc...
# can't do /usr/lib, otherwise /usr/lib/sudo/sudoers.so breaks with "sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner"
# 777 causes "Insecure directory in $ENV{PATH} while running with -T switch at lib/HariSekhonUtils.pm line 1316" - nice catch to this hackery by Perl taint security
#- sudo chmod -R 755 /opt/python /usr/local /usr/lib/python*
# with 755 perms goes back to "error: could not create '/usr/local/lib/python2.7/dist-packages/markupsafe': Permission denied"
# chown root still same error... must be because pure python submodules don't sudo in Travis
#
# Travis has python install before in $PATH even in Perl builds so need to install PyPI modules here otherwise they're not found, but perms not set correctly on Travis build to do this, better than modifying $PATH to put /usr/bin first which is likely to affect many other things including potentially not find the perlbrew installation first
- sudo chown -fR travis /usr/local /usr/lib/python*
# hitting 60 min timeout overall across all builds, retries will mask real error and cut off at random points making debugging harder
#- travis_retry make && travis_retry make zookeeper
- make
- make zookeeper
- make fatpacks
script:
- sudo sysctl -w net.ipv4.conf.all.forwarding=1
# hitting 60 min timeout overall across all builds, retries will mask real error and cut off at random points making debugging harder
- make test
after_success:
- echo "After Success"
after_failure:
- echo "After Failure"
#- for x in /home/travis/.cpanm/work/*/build.log; do echo "uploading $x"; curl -sT "$x" transfer.sh || :; done
# now requires authentication
#curl -sT "$x" chunk.io || :
- make printenv
services:
# docker breaks cassandra, mysql, probably everything
# => wholesale switch over to dockerized testing instead
- docker
# - cassandra
# #- couchdb
# - elasticsearch
# - memcached
# - mongodb
# - mysql
# #- postgreql
# - neo4j
# #- rabbitmq
# - redis
# - riak
#env:
# - DEBUG=1
# env vars are handled in docker test scripts now
# - MYSQL_DATABASE=mysql
# - MYSQL_PASSWORD=""
# - MYSQL_USER=travis