forked from mysql-otp/mysql-otp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
executable file
·74 lines (74 loc) · 2.45 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
os: linux
language: erlang
before_script:
- if [ $MYSQL8 = 1 ]; then
wget https://repo.mysql.com/mysql-apt-config_0.8.14-1_all.deb;
sudo dpkg -i mysql-apt-config_0.8.14-1_all.deb;
sudo apt-get update -q;
sudo apt-get install -q -y --allow-unauthenticated -o Dpkg::Options::=--force-confnew mysql-server;
sudo systemctl restart mysql;
sudo mysql_upgrade;
fi
- sudo service mysql stop
- SSLDIR=/etc/mysql/ make tests-prep
- sudo cp test/ssl/*.pem /etc/mysql/
- sudo chmod -R 660 /etc/mysql/*.pem
- sudo chown -R mysql:mysql /etc/mysql/*.pem
- cat test/ssl/my-ssl.cnf | sudo tee -a /etc/mysql/conf.d/my-ssl.cnf
- sudo service mysql start
- sleep 5
- sudo mysql -uroot -e "CREATE USER otptest@localhost IDENTIFIED BY 'otptest';"
- sudo mysql -uroot -e "GRANT ALL PRIVILEGES ON otptest.* TO otptest@localhost;"
- sudo mysql -uroot -e "CREATE USER otptest2@localhost IDENTIFIED BY 'otptest2';"
- sudo mysql -uroot -e "GRANT ALL PRIVILEGES ON otptest.* TO otptest2@localhost;"
# REQUIRE SSL must be specified only in CREATE USER in MySQL >= 8.0, only in GRANT in MySQL < 5.7;
# MySQL 5.7 allows both variants.
- (sudo mysql -uroot -e "CREATE USER otptestssl@localhost IDENTIFIED BY 'otptestssl' REQUIRE SSL;" &&
sudo mysql -uroot -e "GRANT ALL PRIVILEGES ON otptest.* TO otptestssl@localhost;") ||
(sudo mysql -uroot -e "CREATE USER otptestssl@localhost IDENTIFIED BY 'otptestssl';" &&
sudo mysql -uroot -e "GRANT ALL PRIVILEGES ON otptest.* TO otptestssl@localhost REQUIRE SSL;")
script: 'make tests'
jobs:
include:
- name: OTP/22.1 + MySQL8.0
dist: xenial
env: MYSQL8=1
services:
- mysql
otp_release: 22.1
- name: OTP/21.3 + MySQL5.7
dist: xenial
env: MYSQL8=0
services:
- mysql
otp_release: 21.3
- name: OTP/20.1 + MySQL5.6
dist: trusty
env: MYSQL8=0
services:
- mysql
otp_release: 20.1
- name: OTP/19.3 + MariaDB10.3
dist: xenial
addons:
mariadb: '10.3'
env: MYSQL8=0
otp_release: 19.3
- name: OTP/18.3 + MySQL8.0
dist: xenial
env: MYSQL8=1
services:
- mysql
otp_release: 18.3
- name: OTP/17.3 + MariaDB10.3
dist: xenial
addons:
mariadb: '10.3'
env: MYSQL8=0
otp_release: 17.3
- name: OTP/R16B03-1 + MySQL5.6
dist: trusty
env: MYSQL8=0
services:
- mysql
otp_release: R16B03-1