-
Notifications
You must be signed in to change notification settings - Fork 28
/
.travis.yml
51 lines (46 loc) · 1.46 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
os: linux
dist: focal
services:
- docker
env:
- DB=mariadb:5.5
- DB=mariadb:10.2
- DB=mariadb:10.3
- DB=mariadb:10.4
- DB=mariadb:10.5
- DB=mariadb:10.6
- DB=mysql:5.5
- DB=mysql:5.7
- DB=mysql:8.0
- DB=percona:5.6
- DB=percona:5.7
- DB=percona:8.0
addons:
apt:
update: true
before_script:
- sudo apt install curl libjson-perl
- mysql --version
- mysqladmin --version
- docker run -it --name=mysqltestinstance -d -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -p 3306:3306 ${DB}
- echo -e "[client]\nuser=root\npassword=\"\"\nhost=127.0.0.1" > ~/.my.cnf
- chmod 600 ~/.my.cnf
- git clone https://github.com/datacharmer/test_db.git
- cd test_db
- count=10
- while ! mysql -e 'select version()' && [ $count -gt 0 ]; do echo $count seconds to go; sleep 1; count=$(( $count - 1 )); done
- if [[ $DB =~ .*:8.0 ]] ; then
for file in public_key.pem ca.pem server-cert.pem client-key.pem client-cert.pem ; do
docker cp mysqltestinstance:/var/lib/mysql/$file "${HOME}" ;
done ;
fi
- "cat employees.sql | grep -v 'storage_engine' | mysql"
- cd ..
script:
- /bin/bash ./mysqlconfigurer.sh -k $TRAVIS_RELEEM_API_KEY
- sudo cat /tmp/.mysqlconfigurer/mysqltunerreport.json
- sudo cat /tmp/.mysqlconfigurer/z_aiops_mysql.cnf
after_script:
- docker stop mysqltestinstance
- echo "Standard Output: $(cat /tmp/.mysqlconfigurer/mysqltunerreport.json)"
- echo "Standard Error : $(cat /tmp/.mysqlconfigurer/z_aiops_mysql.cnf)"