Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace custom install script with add-on #7731

Merged
merged 1 commit into from
Jun 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,41 @@ jobs:
- stage: Test
env: DB=mysql MYSQL_VERSION=5.7
php: 7.1
addons:
apt:
sources:
- mysql-5.7-trusty
packages:
- mysql-server
- mysql-client
before_script:
- ./tests/travis/install-mysql-$MYSQL_VERSION.sh
sudo: required

- stage: Test
env: DB=mysql MYSQL_VERSION=5.7
php: 7.2
addons:
apt:
sources:
- mysql-5.7-trusty
packages:
- mysql-server
- mysql-client
before_script:
- ./tests/travis/install-mysql-$MYSQL_VERSION.sh
sudo: required

- stage: Test
env: DB=mysql MYSQL_VERSION=5.7
php: nightly
addons:
apt:
sources:
- mysql-5.7-trusty
packages:
- mysql-server
- mysql-client
before_script:
- ./tests/travis/install-mysql-$MYSQL_VERSION.sh
sudo: required
Expand Down
18 changes: 2 additions & 16 deletions tests/travis/install-mysql-5.7.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,7 @@

set -ex

echo "Installing MySQL 5.7..."

sudo service mysql stop
sudo apt-get remove "^mysql.*"
sudo apt-get autoremove
sudo apt-get autoclean
echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections
wget http://dev.mysql.com/get/mysql-apt-config_0.8.6-1_all.deb
sudo DEBIAN_FRONTEND=noninteractive dpkg -i mysql-apt-config_0.8.6-1_all.deb
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get clean
sudo apt-get update -q
sudo apt-get install -q -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" mysql-server libmysqlclient-dev
sudo mysql_upgrade

echo "Restart mysql..."
sudo mysql -e "use mysql; update user set authentication_string=PASSWORD('') where User='root'; update user set plugin='mysql_native_password';FLUSH PRIVILEGES;"

sudo mysql_upgrade -u root
sudo service mysql restart