forked from claranet/go-zabbix-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (54 loc) · 2.06 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
sudo: required
dist: xenial
language: go
go:
- "1.9"
- "1.10.x"
- "1.11.x"
- "tip"
services:
- mysql
env:
global:
- TEST_ZABBIX_USER=Admin
- TEST_ZABBIX_PASSWORD=zabbix
- TEST_ZABBIX_HOST=localhost
- TEST_ZABBIX_URL=http://${TEST_ZABBIX_HOST}/api_jsonrpc.php
matrix:
- TEST_ZABBIX_VERSION=3.2
before_install:
- sudo hostname $TEST_ZABBIX_HOST && echo "127.0.1.1 $TEST_ZABBIX_HOST" | sudo
tee -a /etc/hosts
- sudo apt update -q
- sudo apt install -y python-pip python-dev jq
- sudo -H pip install ansible==2.5.3
install:
- ansible-galaxy install dj-wasabi.zabbix-server
- ansible-galaxy install dj-wasabi.zabbix-web
- |
cat <<-EOF | head -n -2 > deploy.yml
- hosts: $TEST_ZABBIX_HOST
become: yes
roles:
- { role: geerlingguy.apache }
- { role: dj-wasabi.zabbix-server }
- { role: dj-wasabi.zabbix-web }
vars:
- database_type: mysql
- database_type_long: mysql
- zabbix_server_database: mysql
- zabbix_server_database_long: mysql
- zabbix_server_dbport: 3306
- zabbix_server_mysql_login_host: $TEST_ZABBIX_HOST
- zabbix_server_mysql_login_user: root
- zabbix_url: $TEST_ZABBIX_HOST
- zabbix_version: $TEST_ZABBIX_VERSION
EOF
- ansible-playbook -c local -i "${TEST_ZABBIX_HOST}," deploy.yml
- go install github.com/claranet/go-zabbix-api
script:
- bash -x tests.sh
notifications:
slack:
rooms:
secure: y24xc2cWcuQj7+ZFbkfHspn6DhXktumlcbyXG39zP7lnoRSuXxAzlx6/xJqyp/ifYm0xqjHjSX9cIik6hYPAxck6o/V3COWzE0UAbfaTQIj/RHHM/gAdp+7kdq9xaE/2+FsKybc0L3+GeTPLY1gsqc0y3SjyZ60DGkLQBn9oRcPcSU8HfseQZtBLQKeuBNU8RV3GpQBZK/9hNux1/s+kWz0Nl9z/hqrmkRG1Ab8E12y05Iir0DZEuGsUETUW1rLME3wHCI86TOaIQydb5tN+pIh9jBBScb78whdhZCDAACEP6g0UV9fcvTnRGasTUh+FrN0lpGnNNG7uhZEqmc5tDDHRFNwwL1MYD4hsnBzetX2HZbDvccIu/tsk9REk1X6EFBBMdVe+qTfDAlqoCfnOBoRlAXEKV2QQrVIuM4Ad6lSZl3bfyHubjXCuACadVNtQ+UxF+KB6sBCyN8KekmatMso6wG15XiZIXnWmI+Wvm07EF5E3YmUym9nFVc6u12XiRYbyw2MKbI8Lxqf44ahmQsYEtda1/3uP9rm0ILixjzCGVnvrugusWjERXeo+qolD8fufyNtxzRaLaiQ8xPvEE8jy5/b08vdvrZbCjFjkgIlYKL7sOAE61O1IEyrGPTa/BlRaMGDqnvxxvu1CNpqpCFnqlZPB4FlE1yuVDzAe7GE=