forked from sportsru/ansible-clickhouse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
97 lines (88 loc) · 2.95 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
---
language: python
python: "2.7"
matrix:
include:
- os: linux
dist: trusty
sudo: true
env: ANSIBLE_VERSION='ansible>=2.6,<2.7'
- os: linux
dist: trusty
sudo: true
env: ANSIBLE_VERSION='ansible>=2.7,<2.8'
- os: linux
dist: trusty
sudo: true
env: ANSIBLE_VERSION='latest'
- os: linux
dist: xenial
sudo: true
env: ANSIBLE_VERSION='ansible>=2.6,<2.7'
- os: linux
dist: xenial
sudo: true
env: ANSIBLE_VERSION='ansible>=2.7,<2.8'
- os: linux
dist: xenial
sudo: true
env: ANSIBLE_VERSION='latest'
- os: linux
dist: bionic
sudo: true
env: ANSIBLE_VERSION='ansible>=2.6,<2.7'
- os: linux
dist: bionic
sudo: true
env: ANSIBLE_VERSION='ansible>=2.7,<2.8'
- os: linux
dist: bionic
sudo: true
env: ANSIBLE_VERSION='latest'
# Use the new container infrastructure
sudo: true
# Install ansible
addons:
apt:
packages:
- python-pip
install:
# Install ansible
- if [ "$ANSIBLE_VERSION" = "latest" ]; then pip install ansible; else pip install $ANSIBLE_VERSION; fi
# Check ansible version
- ansible --version
# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' >ansible.cfg
script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
# Full install check
- ansible-playbook tests/test.yml -i tests/inventory -v
- sudo cat /var/log/clickhouse-server/clickhouse-server.err.log
# Clickhouse client checking
- clickhouse-client -q 'select 1'
- clickhouse-client -q 'select 1' -d default
- clickhouse-client -q 'select 1' -d testu1
- clickhouse-client -q 'select 1' -d testu2 -u testuser2 --password testplpassword
- clickhouse-client -q 'select 1' -d testu3
# Remove check
- ansible-playbook tests/test.yml -i tests/inventory -e "clickhouse_remove=yes clickhouse_remove_full=yes" -v
# Partial install check
- ansible-playbook tests/test.yml -i tests/inventory -t install -v
- ansible-playbook tests/test.yml -i tests/inventory -t config_sys -v
- ansible-playbook tests/test.yml -i tests/inventory -t config_db -v
- ansible-playbook tests/test.yml -i tests/inventory -t config -v
- sudo cat /var/log/clickhouse-server/clickhouse-server.err.log
# Http port checking
- curl 'http://127.0.0.1:8123'
- echo 'SELECT 1' | curl 'http://testuser2:testplpassword@localhost:8123?database=testu2' -d @-
# Clickhouse client checking
- clickhouse-client -q 'select 1'
- clickhouse-client -q 'select 1' -d default
- clickhouse-client -q 'select 1' -d testu1
- clickhouse-client -q 'select 1' -d testu2 -u testuser2 --password testplpassword
- clickhouse-client -q 'select 1' -d testu3
#Full remove check
- ansible-playbook tests/test.yml -i tests/inventory -e "clickhouse_remove=yes clickhouse_remove_full=yes" -v
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/