forked from HariSekhon/Nagios-Plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
104 lines (93 loc) · 4.1 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
# 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
#
language: perl
perl:
- "5.22"
# this build has thread support
- "5.18-shrplib"
#- "5.16"
# 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"
sudo: required
notifications:
email: false
branches:
only:
- master
env:
DOCKER_COMPOSE_VERSION: 1.9.0
before_install:
- sudo rm /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
# 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 -R travis /opt/python /usr/local /usr/lib/python*
- make && make zookeeper
script:
make test
after_success:
- echo "After Success"
- curl -ivv --data {build:true} -X POST https://registry.hub.docker.com/u/harisekhon/nagios-plugins/trigger/5b0d1a59-8b53-466a-87d7-8e99dfd01f16/
- curl -ivv --data {build:true} -X POST https://registry.hub.docker.com/u/harisekhon/alpine-github/trigger/8d9cb826-48df-439c-8c20-1975713064fc/
- curl -ivv --data {build:true} -X POST https://registry.hub.docker.com/u/harisekhon/centos-github/trigger/316d1158-7ffb-49a4-a7bd-8e5456ba2d15/
- curl -ivv --data {build:true} -X POST https://registry.hub.docker.com/u/harisekhon/ubuntu-github/trigger/abd4dbf0-14bc-454f-9cde-081ec014bc48/
- curl -ivv --data {build:true} -X POST https://registry.hub.docker.com/u/harisekhon/debian-github/trigger/0cfb3fe7-2028-494b-a43b-068435e6a2b3/
after_failure:
- echo "After Failure"
- for x in /home/travis/.cpanm/work/*/build.log; do echo "uploading $x"; curl -sT "$x" transfer.sh || :; curl -sT "$x" chunk.io || :; done
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 stuff is handled with docker test scripts now
#env:
# global:
# - MYSQL_DATABASE=mysql
# - MYSQL_PASSWORD=""
# - MYSQL_USER=travis