-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify CI changes to explicitly install and configure MySQL8
Signed-off-by: Matt Lord <[email protected]>
- Loading branch information
Showing
6 changed files
with
18 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,32 +27,16 @@ jobs: | |
- name: Get dependencies | ||
run: | | ||
if [ ${{matrix.os}} = "ubuntu-latest" ]; then | ||
sudo DEBIAN_FRONTEND="noninteractive" apt-get update | ||
# Uninstall any previously installed MySQL first | ||
sudo systemctl stop apparmor | ||
sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common | ||
sudo apt-get -y autoremove | ||
sudo apt-get -y autoclean | ||
sudo deluser mysql | ||
sudo rm -rf /var/lib/mysql | ||
sudo rm -rf /etc/mysql | ||
# Install mysql80 | ||
# Setup MySQL 8.0 | ||
wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.20-1_all.deb | ||
echo mysql-apt-config mysql-apt-config/select-server select mysql-8.0 | sudo debconf-set-selections | ||
sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* | ||
sudo apt-get update | ||
sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-server mysql-client | ||
# Install everything else we need, and configure | ||
sudo apt-get install -y make unzip g++ etcd curl git wget eatmydata | ||
sudo service mysql stop | ||
sudo service etcd stop | ||
sudo bash -c "echo '/usr/sbin/mysqld { }' > /etc/apparmor.d/usr.sbin.mysqld" # https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1806263 | ||
sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata | ||
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ | ||
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld || echo "could not remove mysqld profile" | ||
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld | ||
elif [ ${{matrix.os}} = "macos-latest" ]; then | ||
brew install [email protected] make unzip etcd curl git wget | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,32 +27,16 @@ jobs: | |
- name: Get dependencies | ||
run: | | ||
if [ ${{matrix.os}} = "ubuntu-latest" ]; then | ||
sudo DEBIAN_FRONTEND="noninteractive" apt-get update | ||
# Uninstall any previously installed MySQL first | ||
sudo systemctl stop apparmor | ||
sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common | ||
sudo apt-get -y autoremove | ||
sudo apt-get -y autoclean | ||
sudo deluser mysql | ||
sudo rm -rf /var/lib/mysql | ||
sudo rm -rf /etc/mysql | ||
# Install mysql80 | ||
# Setup MySQL 8.0 | ||
wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.20-1_all.deb | ||
echo mysql-apt-config mysql-apt-config/select-server select mysql-8.0 | sudo debconf-set-selections | ||
sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* | ||
sudo apt-get update | ||
sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-server mysql-client | ||
# Install everything else we need, and configure | ||
sudo apt-get install -y make unzip g++ etcd curl git wget eatmydata | ||
sudo service mysql stop | ||
sudo service etcd stop | ||
sudo bash -c "echo '/usr/sbin/mysqld { }' > /etc/apparmor.d/usr.sbin.mysqld" # https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1806263 | ||
sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata | ||
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ | ||
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld || echo "could not remove mysqld profile" | ||
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld | ||
elif [ ${{matrix.os}} = "macos-latest" ]; then | ||
brew install [email protected] make unzip etcd curl git wget | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,32 +27,16 @@ jobs: | |
- name: Get dependencies | ||
run: | | ||
if [ ${{matrix.os}} = "ubuntu-latest" ]; then | ||
sudo DEBIAN_FRONTEND="noninteractive" apt-get update | ||
# Uninstall any previously installed MySQL first | ||
sudo systemctl stop apparmor | ||
sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common | ||
sudo apt-get -y autoremove | ||
sudo apt-get -y autoclean | ||
sudo deluser mysql | ||
sudo rm -rf /var/lib/mysql | ||
sudo rm -rf /etc/mysql | ||
# Install mysql80 | ||
# Setup MySQL 8.0 | ||
wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.20-1_all.deb | ||
echo mysql-apt-config mysql-apt-config/select-server select mysql-8.0 | sudo debconf-set-selections | ||
sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* | ||
sudo apt-get update | ||
sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-server mysql-client | ||
# Install everything else we need, and configure | ||
sudo apt-get install -y make unzip g++ etcd curl git wget eatmydata | ||
sudo service mysql stop | ||
sudo service etcd stop | ||
sudo bash -c "echo '/usr/sbin/mysqld { }' > /etc/apparmor.d/usr.sbin.mysqld" # https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1806263 | ||
sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata | ||
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ | ||
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld || echo "could not remove mysqld profile" | ||
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld | ||
elif [ ${{matrix.os}} = "macos-latest" ]; then | ||
brew install [email protected] make unzip etcd curl git wget | ||
fi | ||
|