Commit 634d25d5 authored by Otto Kekäläinen's avatar Otto Kekäläinen
Browse files

Enable automatic restarts from maint scripts in gitlab-ci.yml

By default the policy-rc.d exits with code 101 and prevents from services
inside Docker to start with the rationale that it is not needed as the
services will not run by default when a Docker container is started
anyway, but we want the mysql/mariadb service to run so that we can
simulate real install/upgrade scenarios.
parent 936455fe
...@@ -62,6 +62,7 @@ fresh install: ...@@ -62,6 +62,7 @@ fresh install:
paths: paths:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- apt-get update - apt-get update
# Install MariaDB built in this commit # Install MariaDB built in this commit
...@@ -69,8 +70,7 @@ fresh install: ...@@ -69,8 +70,7 @@ fresh install:
# Verify installation of MariaDB built in this commit # Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version - mariadb --version # Client version
- service mysql restart || true # Always proceed even if init failed - service mysql status
- service mysql status || true
- mkdir -p debug # Ensure dir exists before using it - mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list - find /var/lib/mysql -ls > debug/var-lib-mysql.list
- cp -ra /etc/mysql debug/etc-mysql - cp -ra /etc/mysql debug/etc-mysql
...@@ -92,6 +92,7 @@ test basic features: ...@@ -92,6 +92,7 @@ test basic features:
paths: paths:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- apt-get update - apt-get update
# Install MariaDB built in this commit # Install MariaDB built in this commit
...@@ -99,8 +100,7 @@ test basic features: ...@@ -99,8 +100,7 @@ test basic features:
# Verify installation of MariaDB built in this commit # Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version - mariadb --version # Client version
- service mysql restart || true # Always proceed even if init failed - service mysql status
- service mysql status || true
- mkdir -p debug # Ensure dir exists before using it - mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list - find /var/lib/mysql -ls > debug/var-lib-mysql.list
- cp -ra /etc/mysql debug/etc-mysql - cp -ra /etc/mysql debug/etc-mysql
...@@ -181,14 +181,14 @@ mariadb-10.1.x to mariadb-10.1.y upgrade: ...@@ -181,14 +181,14 @@ mariadb-10.1.x to mariadb-10.1.y upgrade:
paths: paths:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- apt-get update - apt-get update
# Install almost everything currently in Debian Stretch # Install almost everything currently in Debian Stretch
- apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadbd*' 'libmariadbclient*' - apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadbd*' 'libmariadbclient*'
# Verify installation of MariaDB currently in Debian Stretch # Verify installation of MariaDB currently in Debian Stretch
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- service mysql status || true # Always proceed even if init failed - service mysql status
- service mysql restart || true
- mariadb --skip-column-names -e "select @@version, @@version_comment" - mariadb --skip-column-names -e "select @@version, @@version_comment"
- echo 'SHOW DATABASES;' | mysql - echo 'SHOW DATABASES;' | mysql
# Install MariaDB built in this commit # Install MariaDB built in this commit
...@@ -196,8 +196,7 @@ mariadb-10.1.x to mariadb-10.1.y upgrade: ...@@ -196,8 +196,7 @@ mariadb-10.1.x to mariadb-10.1.y upgrade:
# Verify installation of MariaDB built in this commit # Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version - mariadb --version # Client version
- service mysql restart || true # Always proceed even if init failed - service mysql status
- service mysql status || true
- mkdir -p debug # Ensure dir exists before using it - mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list - find /var/lib/mysql -ls > debug/var-lib-mysql.list
- cp -ra /etc/mysql debug/etc-mysql - cp -ra /etc/mysql debug/etc-mysql
...@@ -219,14 +218,14 @@ mariadb-10.0 to mariadb-10.1 upgrade: ...@@ -219,14 +218,14 @@ mariadb-10.0 to mariadb-10.1 upgrade:
paths: paths:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- apt-get update - apt-get update
# Install almost everything currently in Debian Jessie # Install almost everything currently in Debian Jessie
- apt-get install -y 'mariadb-*' 'libmariadb*' - apt-get install -y 'mariadb-*' 'libmariadb*'
# Verify installation of MariaDB from Jessie # Verify installation of MariaDB from Jessie
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- service mysql status || true # Always proceed even if init failed - service mysql status
- service mysql restart || true
- mysql --skip-column-names -e "select @@version, @@version_comment" - mysql --skip-column-names -e "select @@version, @@version_comment"
- echo 'SHOW DATABASES;' | mysql - echo 'SHOW DATABASES;' | mysql
# Install MariaDB built in this commit # Install MariaDB built in this commit
...@@ -236,8 +235,7 @@ mariadb-10.0 to mariadb-10.1 upgrade: ...@@ -236,8 +235,7 @@ mariadb-10.0 to mariadb-10.1 upgrade:
# Verify installation of MariaDB built in this commit # Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version - mariadb --version # Client version
- service mysql restart || true # Always proceed even if init failed - service mysql status
- service mysql status || true
- mkdir -p debug # Ensure dir exists before using it - mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list - find /var/lib/mysql -ls > debug/var-lib-mysql.list
- cp -ra /etc/mysql debug/etc-mysql - cp -ra /etc/mysql debug/etc-mysql
...@@ -259,13 +257,13 @@ mysql-5.5 to mariadb-10.1 upgrade: ...@@ -259,13 +257,13 @@ mysql-5.5 to mariadb-10.1 upgrade:
paths: paths:
- ${WORKING_DIR}/debug - ${WORKING_DIR}/debug
script: script:
- sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts
- cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output
- apt-get update - apt-get update
- apt-get install -y mysql-server - apt-get install -y mysql-server
# Verify installation of MySQL from Jessie # Verify installation of MySQL from Jessie
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- service mysql status || true # Always proceed even if init failed - service mysql status
- service mysql restart || true
- mysql --skip-column-names -e "select @@version, @@version_comment" - mysql --skip-column-names -e "select @@version, @@version_comment"
- echo 'SHOW DATABASES;' | mysql - echo 'SHOW DATABASES;' | mysql
# Install MariaDB built in this commit # Install MariaDB built in this commit
...@@ -275,8 +273,7 @@ mysql-5.5 to mariadb-10.1 upgrade: ...@@ -275,8 +273,7 @@ mysql-5.5 to mariadb-10.1 upgrade:
# Verify installation of MariaDB built in this commit # Verify installation of MariaDB built in this commit
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
- mariadb --version # Client version - mariadb --version # Client version
- service mysql restart || true # Always proceed even if init failed - service mysql status
- service mysql status || true
- mkdir -p debug # Ensure dir exists before using it - mkdir -p debug # Ensure dir exists before using it
- find /var/lib/mysql -ls > debug/var-lib-mysql.list - find /var/lib/mysql -ls > debug/var-lib-mysql.list
- cp -ra /etc/mysql debug/etc-mysql - cp -ra /etc/mysql debug/etc-mysql
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment