Commit ce0f9701 authored by helmo's avatar helmo

Merge branch 'dev-ci-test-buster' into 7.x-3.x

parents 31a3509d fe6fda3b
......@@ -88,6 +88,11 @@ test:debian-stretch-aegir3-apt:
dependencies:
- build:deb
only:
- 7.x-3.x
- /^7\.x-3\.\d+\.x/
- /-runalltests$/
before_script:
- apt-get update
# Avoid ERROR: invoke-rc.d: policy-rc.d denied execution of start.
......@@ -97,6 +102,22 @@ test:debian-stretch-aegir3-apt:
script: "scripts/ci-aegir-dev-install-apt-debian9.sh"
test:debian-buster-aegir3-apt:
stage: test
image: debian:buster
allow_failure: false
dependencies:
- build:deb
before_script:
- apt-get update
# Avoid ERROR: invoke-rc.d: policy-rc.d denied execution of start.
- echo "#!/bin/sh" > /usr/sbin/policy-rc.d
- echo "exit 0" >> /usr/sbin/policy-rc.d
- apt-get install --yes sudo curl
script: "scripts/ci-aegir-dev-install-apt-debian10.sh"
test:ubuntu-xenial-aegir3-apt:
stage: test
image: ubuntu:xenial
......
......@@ -33,6 +33,9 @@ case "$1" in
# this obviously doesn't work for git releases
VERSION=`sed -n '/^version/{s/^.*= *//;p}' /usr/share/drush/commands/provision/provision.info`
# TODO: lookup? composer installs?
DRUSH_PATH="/usr/local/bin/drush"
FLAGS="--yes"
if [ "$DPKG_DEBUG" = "developer" ]; then
FLAGS="$FLAGS --debug"
......@@ -68,10 +71,10 @@ case "$1" in
chown aegir:aegir "$AEGIRHOME" "$AEGIRHOME/config" "$AEGIRHOME/config/$WEBSERVER.conf"
# flush the drush cache to find new commands
su -s /bin/sh aegir -c 'drush cache-clear drush'
su -s /bin/sh aegir -c "$DRUSH_PATH cache-clear drush"
site_uri=`su -s /bin/sh aegir -c 'drush @hostmaster status --fields="uri" --field-labels=0 2>/dev/null | tr "\n" " " | sed -e "s/^[[:space:]]*//g" -e "s/[[:space:]]*\$//g"'`
drupal_root=`su -s /bin/sh aegir -c 'drush @hostmaster status --fields="root" --field-labels=0 2>/dev/null | tr "\n" " " | sed -e "s/^[[:space:]]*//g" -e "s/[[:space:]]*\$//g"'`
site_uri=`su -s /bin/sh aegir -c "$DRUSH_PATH @hostmaster status --fields='uri' --field-labels=0 2>/dev/null | tr '\n' ' ' | sed -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*\$//g'"`
drupal_root=`su -s /bin/sh aegir -c "$DRUSH_PATH @hostmaster status --fields='root' --field-labels=0 2>/dev/null | tr '\n' ' ' | sed -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*\$//g'"`
if [ -d "$drupal_root" ]; then
# upgrade
......@@ -95,14 +98,14 @@ case "$1" in
echo "it seems to be the same version as the one we're trying to install, not upgrading"
else
echo "upgrading the frontend from $drupal_root to $NEW_PLATFORM"
if su -s /bin/sh aegir -c 'drush @hostmaster pm-list --status=enabled --pipe' | grep -q hosting_queued; then
if su -s /bin/sh aegir -c "$DRUSH_PATH @hostmaster pm-list --status=enabled --pipe" | grep -q hosting_queued; then
service hosting-queued stop
fi
cd "$drupal_root"
su -s /bin/sh aegir -c "drush hostmaster-migrate $FLAGS '$site_uri' '$NEW_PLATFORM'"
su -s /bin/sh aegir -c "$DRUSH_PATH hostmaster-migrate $FLAGS '$site_uri' '$NEW_PLATFORM'"
echo "upgrade finished, old platform left in $drupal_root"
# restart daemon if enabled
if su -s /bin/sh aegir -c 'drush @hostmaster pm-list --status=enabled --pipe' | grep -q hosting_queued; then
if su -s /bin/sh aegir -c "$DRUSH_PATH @hostmaster pm-list --status=enabled --pipe" | grep -q hosting_queued; then
service hosting-queued start
fi
fi
......@@ -173,7 +176,7 @@ case "$1" in
fi
# pass data through JSON for extra security
su -s /bin/sh aegir -c "cd $AEGIRHOME && drush hostmaster-install $FLAGS --backend $site_uri 2>&1 | drush backend-parse $DEBUG" <<EOF
su -s /bin/sh aegir -c "cd $AEGIRHOME && $DRUSH_PATH hostmaster-install $FLAGS --backend $site_uri 2>&1 | $DRUSH_PATH backend-parse $DEBUG" <<EOF
{ "yes": 1,
"version": "$VERSION",
"aegir_db_host": "$AEGIR_DB_HOST",
......@@ -183,11 +186,11 @@ case "$1" in
}
EOF
# flush the drush cache to find new commands
su -s /bin/sh aegir -c 'drush cache-clear drush'
su -s /bin/sh aegir -c "$DRUSH_PATH cache-clear drush"
# on new installs, we default to having the daemon enabled
echo 'Enabling hosting-queued daemon'
su -s /bin/sh aegir -c 'drush @hostmaster pm-enable -y hosting_queued'
su -s /bin/sh aegir -c "$DRUSH_PATH @hostmaster pm-enable -y hosting_queued"
service hosting-queued start
if [ -f /bin/systemctl ]; then
# There must be a better way, but we're trying to stay compatible with Debian Wheezy and Jessie.
......@@ -215,10 +218,10 @@ EOF
esac
# this will ensure that this script aborts if the site can't be bootstrapped
if su -s /bin/sh aegir -c 'drush @hostmaster status' 2>&1 | grep -q 'Drupal bootstrap.*Successful'; then
if su -s /bin/sh aegir -c "$DRUSH_PATH @hostmaster status" 2>&1 | grep -q 'Drupal bootstrap.*Successful'; then
echo 'Aegir frontend bootstrap correctly, operation was a success!'
echo 'Use this URL to login on your new site:'
su -s /bin/sh aegir -c 'drush @hostmaster uli'
su -s /bin/sh aegir -c "$DRUSH_PATH @hostmaster uli"
else
echo 'Aegir frontend failed to bootstrap, something went wrong!'
echo 'Look at the log above for clues or run with DPKG_DEBUG=developer'
......
......@@ -11,7 +11,7 @@ Vcs-browser: http://drupalcode.org/project/provision.git
Package: aegir3-provision
Architecture: all
Depends: ${misc:Depends}, php5-cli (>= 5.3) | php7.0-cli | php7.1-cli | php7.2-cli, php5 | php7.0-xml | php7.1-xml | php7.2-xml, php5-mysql | php7.0-mysql | php7.1-mysql | php7.2-mysql, mysql-client | mariadb-client, sudo, postfix | mail-transport-agent, apache2 | nginx, adduser, ucf, curl
Depends: ${misc:Depends}, php5-cli (>= 5.3) | php7.0-cli | php7.1-cli | php7.2-cli | php-cli, php5 | php7.0-xml | php7.1-xml | php7.2-xml | php-xml, php5-mysql | php7.0-mysql | php7.1-mysql | php7.2-mysql | php-mysql, mysql-client | mariadb-client, sudo, postfix | mail-transport-agent, apache2 | nginx, adduser, ucf, curl
Recommends: mysql-server | mariadb-server, rsync, composer
Conflicts: aegir-provision, aegir-provision2, aegir2-provision
Replaces: aegir-provision, aegir-provision2, aegir2-provision
......@@ -30,8 +30,8 @@ Description: mass Drupal hosting system - backend
Package: aegir3-hostmaster
Architecture: all
Depends: ${misc:Depends}, php5-mysql | php7.0-mysql | php7.1-mysql | php7.2-mysql, php5-gd | php7.0-gd | php7.1-gd | php7.2-gd, apache2 | nginx, libapache2-mod-php5 | libapache2-mod-php7.0 | libapache2-mod-php7.1 | libapache2-mod-php7.2 | php5-fpm | php7.0-fpm | php7.1-fpm | php7.2-fpm,, aegir3-provision (>= ${source:Version}), git-core, unzip, lsb-base (>= 3.0-6)
Recommends: php5 | php7.0 | php7.1 | php7.2
Depends: ${misc:Depends}, php5-mysql | php7.0-mysql | php7.1-mysql | php7.2-mysql | php-mysql, php5-gd | php7.0-gd | php7.1-gd | php7.2-gd | php-gd, apache2 | nginx, libapache2-mod-php5 | libapache2-mod-php7.0 | libapache2-mod-php7.1 | libapache2-mod-php7.2 | libapache2-mod-php | php5-fpm | php7.0-fpm | php7.1-fpm | php7.2-fpm | php-fpm, aegir3-provision (>= ${source:Version}), git-core, unzip, lsb-base (>= 3.0-6)
Recommends: php5 | php7.0 | php7.1 | php7.2 | php
Conflicts: aegir-hostmaster, aegir-hostmaster2, aegir2-hostmaster
Replaces: aegir-hostmaster, aegir-hostmaster2, aegir2-hostmaster
Description: mass Drupal hosting system - frontend
......@@ -69,8 +69,8 @@ Description: mass Drupal hosting system
Package: aegir3-cluster-slave
Architecture: all
Depends: ${misc:Depends}, php5-mysql | php7.0-mysql | php7.1-mysql | php7.2-mysql, sudo, apache2, adduser, ucf, libapache2-mod-php5 | libapache2-mod-php7.0 | libapache2-mod-php7.1, libapache2-mod-php7.2, rsync, nfs-client, mysql-client
Recommends: php5-gd | php7.0-gd | php7.1-gd | php7.2-gd, php5 | php7.0 | php7.1 | php7.2
Depends: ${misc:Depends}, php5-mysql | php7.0-mysql | php7.1-mysql | php7.2-mysql | php-mysql, sudo, apache2, adduser, ucf, libapache2-mod-php5 | libapache2-mod-php7.0 | libapache2-mod-php7.1 | libapache2-mod-php7.2 | libapache2-mod-php, rsync, nfs-client, mysql-client
Recommends: php5-gd | php7.0-gd | php7.1-gd | php7.2-gd, php5 | php7.0 | php7.1 | php7.2 | php
Conflicts: aegir-cluster-slave, aegir-cluster-slave2, aegir2-cluster-slave, aegir3
Replaces: aegir-cluster-slave, aegir-cluster-slave2, aegir2-cluster-slave
Description: mass Drupal hosting system - slave backend
......
#
# Install Aegir debian packages located in the 'build/' directory.
# These are provided by the GitLab CI build stage.
#
# This script is tuned for Debian 9 - Stretch.
#
echo "[CI] Updating APT"
sudo apt-get update
echo "[CI] Setting debconf settings"
echo "debconf debconf/frontend select Noninteractive" | sudo debconf-set-selections
sudo debconf-set-selections <<EOF
aegir3-hostmaster aegir/db_password string PASSWORD
aegir3-hostmaster aegir/db_password seen true
aegir3-hostmaster aegir/db_user string aegir_root
aegir3-hostmaster aegir/db_host string localhost
aegir3-hostmaster aegir/email string aegir@example.com
aegir3-hostmaster aegir/site string aegir.example.com
postfix postfix/main_mailer_type select Local only
EOF
set -x
echo "[CI] Pre-installing dependencies"
sudo apt-get install --yes mariadb-server php-mysql php-cli
echo "[CI] Installing .deb files .. will fail on missing packages"
sudo dpkg --install build/aegir3_*.deb build/aegir3-provision*.deb build/aegir3-hostmaster*.deb
echo "[CI] Installing remaining packages and configuring our debs"
sudo DPKG_DEBUG=developer apt-get install --fix-broken --yes
#
# Install Aegir debian packages located in the projects stable repository.
#
# This script is tuned for Debian 10 - Buster
#
sudo apt-get install --yes wget
sudo wget -O /usr/share/keyrings/aegir-archive-keyring.gpg https://debian.aegirproject.org/aegir-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/aegir-archive-keyring.gpg] https://debian.aegirproject.org stable main" | sudo tee -a /etc/apt/sources.list.d/aegir-stable.list
sudo apt-get update
#echo "debconf debconf/frontend select Noninteractive" | debconf-set-selections
sudo apt-get install --yes mariadb-server
sudo /usr/bin/mysql -e "GRANT ALL ON *.* TO 'aegir_root'@'localhost' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION"
debconf-set-selections <<EOF
aegir3-hostmaster aegir/email string aegir@example.com
aegir3-hostmaster aegir/site string aegir.example.com
postfix postfix/main_mailer_type select Local only
EOF
sudo DPKG_DEBUG=developer apt-get install --yes aegir3
Markdown is supported
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