Commit 8bd488aa authored by helmo's avatar helmo

Merge branch 'feature/gitlab-testing' into 7.x-3.x

parents c7f8b826 f01f8560
......@@ -7,6 +7,7 @@ stages:
- build
- test
- publish
- upgradetest
# Stage "build"
build:deb:
......@@ -36,9 +37,6 @@ test:debian-jessie-aegir3-apt:
image: debian:jessie
dependencies:
- build:deb
only:
- 7.x-3.x
- triggers
before_script:
- apt-get update
......@@ -57,7 +55,6 @@ test:debian-stretch-aegir3-apt:
- build:deb
only:
- 7.x-3.x
- triggers
before_script:
- apt-get update
......@@ -75,7 +72,6 @@ test:ubuntu-xenial-aegir3-apt:
- build:deb
only:
- 7.x-3.x
- triggers
before_script:
- apt-get update
......@@ -86,6 +82,40 @@ test:ubuntu-xenial-aegir3-apt:
script: "scripts/ci-aegir-dev-install-apt-ubuntu.sh"
test:behat:
stage: test
image: aegir/hostmaster:packaging_base
dependencies:
- build:deb
allow_failure: true
variables:
AEGIR_TESTS_VERSION: "master"
before_script:
- sudo apt-get update
- sudo apt-get install --yes apt-transport-https ca-certificates curl gnupg2 software-properties-common
- curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
- sudo apt-key fingerprint 0EBFCD88
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get install --yes docker-ce
- docker info
- git clone http://github.com/aegir-project/tests.git tests
- cd tests
- git checkout $AEGIR_TESTS_VERSION
# Run prepare scripts.
- cd travis
- sudo bash prepare-docker.sh
- bash prepare-testenv.sh
script:
# Tests are included in the docker-compose.yml file in the tests repo.
- sudo docker-compose -f docker-compose-provision.yml run hostmaster
publish:unstable-repo:
stage: publish
......@@ -93,6 +123,9 @@ publish:unstable-repo:
- build:deb
allow_failure: true
only:
- 7.x-3.x
image: ruby:2.1
before_script:
# install ssh-agent
......@@ -113,3 +146,37 @@ publish:unstable-repo:
- ls -lah build/*
- scp build/* ci@aegir0.aegir.coop:/var/www/repos/incoming/
# reprepro should pick this up in seconds and update the repository index.
# Upgrade the latest stable Aegir to our unstable repo.
upgradetest:debian-jessie-aegir3-apt-upgrade:
stage: upgradetest
image: debian:jessie
dependencies:
- publish:unstable-repo
when: manual
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 cron
script:
- "scripts/ci-aegir-stable-install-apt-debian.sh"
# extra step to run the task queue.
- sudo su aegir --login --command 'drush @hostmaster php-eval "echo hosting_task_count();"'
- sudo su aegir --login --command 'drush @hostmaster hosting-tasks --force'
- sudo su aegir --login --command 'drush @hostmaster php-eval "echo hosting_task_count();"'
- sudo su aegir --login --command 'drush @hostmaster hosting-tasks --force'
- sudo su aegir --login --command 'drush @hostmaster php-eval "echo hosting_task_count();"'
- sudo su aegir --login --command 'drush @hostmaster php-eval "echo hosting_task_count_running();"'
- sleep 2m
- sudo su aegir --login --command 'drush @hostmaster php-eval "echo hosting_task_count_running();"'
# upgrade to the latest version from the unstable repo.
- rm -v /etc/apt/sources.list.d/aegir-stable.list
- echo "deb http://debian2.aegirproject.org unstable main" | sudo tee -a /etc/apt/sources.list.d/aegir-unstable.list
- sudo apt-get update
- sudo apt-get --yes upgrade
......@@ -52,6 +52,7 @@ The following operations will be done:
0. prompt you for a debian/changelog entry
1. change the makefile to download tarball
2. change the upgrade.sh.txt version
. change the .gitlab-ci.yml to build a release package
3. display the resulting diff
4. commit those changes to git
5. lay down the tag
......@@ -61,8 +62,6 @@ The following operations will be done:
9. clone fresh copies of golden contrib to lay down the tag
10. (optionally) push those changes
ARE YOU SURE you disabled the D_aegir-debian-build-3x job in Jenkins?
The operation can be aborted before step 8. Don't forget that as
long as changes are not pushed upstream, this can all be reverted (see
git-reset(1) and git-revert(1) ).
......@@ -92,6 +91,9 @@ git add provision.info && rm provision.info.tmp
echo changing upgrade.sh.txt version
sed -i'.tmp' -e"s/AEGIR_VERSION=.*$/AEGIR_VERSION=\"$major-$version\"/" upgrade.sh.txt && git add upgrade.sh.txt && rm upgrade.sh.txt.tmp
echo updating the package version scheme, dev packages get a buildID added, released do not.
sed -i -e"s/new_version=.*$/new_version=\"\${version}\"/" .gitlab-ci.yml && git add .gitlab-ci.yml
echo resulting changes to be committed:
git diff --cached | cat
......@@ -157,8 +159,8 @@ echo =========
echo
# Can we push?
if prompt_yes_no "Push tags and commits upstream? "; then
# this makes sure we push the commit *and* the tag
git push --tags origin HEAD
# this makes sure we push the commit *and* the tag, and leave the revert commit for the moment.
git push --tags origin tag $NEW_TAG:$CURRENT_BRANCH
git --work-tree=build-area/hostmaster --git-dir=build-area/hostmaster/.git push --tags origin HEAD
git --work-tree=build-area/hosting --git-dir=build-area/hosting/.git push --tags origin HEAD
git --work-tree=build-area/eldir --git-dir=build-area/eldir/.git push --tags origin HEAD
......@@ -187,3 +189,7 @@ if prompt_yes_no "Push tags and commits for GOLDEN CONTRIB upstream? "; then
git --work-tree=build-area/$shortname --git-dir=build-area/$shortname/.git push --tags origin HEAD
done
fi
if prompt_yes_no "Is GitLab finished building the release packages? Then we can push the revert commit. "; then
git push origin
fi
......@@ -24,7 +24,7 @@ postfix postfix/main_mailer_type select Local only
EOF
sudo apt-get install --yes mysql-server php5-mysql php5-cli
sudo apt-get install --yes mysql-server php5-mysql php5-cli php5 postfix
set -x
......
#
# Install Aegir debian packages located in the projects stable repository.
#
# This script is tuned for Debian 8 - Jessie.
#
echo "deb http://debian.aegirproject.org stable main" | sudo tee -a /etc/apt/sources.list.d/aegir-stable.list
curl http://debian.aegirproject.org/key.asc | sudo apt-key add -
sudo apt-get update
echo "debconf debconf/frontend select Noninteractive" | debconf-set-selections
echo mysql-server-5.5 mysql-server/root_password password PASSWORD | debconf-set-selections
echo mysql-server-5.5 mysql-server/root_password_again password PASSWORD | debconf-set-selections
debconf-set-selections <<EOF
aegir3-hostmaster aegir/db_password string PASSWORD
aegir3-hostmaster aegir/db_password seen true
aegir3-hostmaster aegir/db_user string 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
sudo DPKG_DEBUG=developer apt-get install --yes aegir3 mysql-server
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