summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2016-02-03 17:45:57 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2016-02-03 17:45:57 +0100
commit49420a14aaff477b2b112bf1a361d583dcc2c56f (patch)
treeaa10f6f2ace1a963b48adbc125f134a03e5e17e1
parente913b525a9c5423be9fe75a119453d9b80a25baf (diff)
downloaddocker-49420a14aaff477b2b112bf1a361d583dcc2c56f.tar.gz
Update some of the CI images to actually be able to do something
-rw-r--r--99-ci-jessie/Dockerfile13
-rwxr-xr-x99-ci-jessie/entrypoint.sh148
-rw-r--r--99-ci-jessie/functions.sh65
-rw-r--r--99-ci-maipo/Dockerfile37
-rw-r--r--99-ci-trusty/Dockerfile13
-rwxr-xr-x99-ci-trusty/entrypoint.sh148
-rw-r--r--99-ci-trusty/functions.sh65
-rw-r--r--99-ci-xenial/Dockerfile13
-rwxr-xr-x99-ci-xenial/entrypoint.sh148
-rw-r--r--99-ci-xenial/functions.sh65
10 files changed, 675 insertions, 40 deletions
diff --git a/99-ci-jessie/Dockerfile b/99-ci-jessie/Dockerfile
index 4f69638..fe9dfd3 100644
--- a/99-ci-jessie/Dockerfile
+++ b/99-ci-jessie/Dockerfile
@@ -5,11 +5,18 @@ MAINTAINER Jeroen van Meeuwen <vanmeeuwen@kolabsys.com>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
- apt-get -y install wget
+ apt-get -y install \
+ aptitude \
+ git \
+ wget && \
+ apt-get clean
ADD /kolab.list /etc/apt/sources.list.d/kolab.list
RUN wget -q -O- http://obs.kolabsys.com/repositories/Kolab:/Winterfell/Debian_8.0/Release.key | apt-key add -
-RUN apt-get update && \
- apt-get -y install kolab
+ADD /functions.sh /functions.sh
+ADD /entrypoint.sh /entrypoint.sh
+RUN chmod a+x /entrypoint.sh
+
+ENTRYPOINT [ "/entrypoint.sh" ]
diff --git a/99-ci-jessie/entrypoint.sh b/99-ci-jessie/entrypoint.sh
new file mode 100755
index 0000000..a099eca
--- /dev/null
+++ b/99-ci-jessie/entrypoint.sh
@@ -0,0 +1,148 @@
+#!/bin/bash
+
+if [ ! -d "/srv/stick.git" ]; then
+ git clone https://git.kolab.org/diffusion/QA/stick.git /srv/stick.git
+elif [ -z "${PS1}" ]; then
+ pushd /srv/stick.git
+ git remote set-url origin https://git.kolab.org/diffusion/QA/stick.git
+ git fetch origin
+ git reset --hard origin/master
+ git clean -d -f -x
+ popd
+fi
+
+source /functions.sh
+
+export TEST_BUILD=${TEST_BUILD:-0}
+export TEST_FUNCTIONAL=${TEST_FUNCTIONAL:-0}
+export TEST_INTEGRATION=${TEST_INTEGRATION:-0}
+export TEST_PERFORMANCE=${TEST_PERFORMANCE:-0}
+export TEST_UNIT=${TEST_UNIT:-0}
+export TEST_OBS=${TEST_OBS:-0}
+
+# If PS1 is set, we're interactive
+if [ ! -z "${PS1}" ]; then
+ # Set a sensible prompt
+ PS1='[\u@${IMAGE} \W]\$ '
+
+ export GIT_PS1_SHOWDIRTYSTATE=1
+ export GIT_PS1_SHOWUNTRACKEDFILES=1
+ export GIT_PS1_SHOWUPSTREAM="auto verbose"
+
+ if [ ! -f "/etc/bash_completion" ]; then
+ if [ -f "/etc/bash_completion.d/git" ]; then
+ . /etc/bash_completion.d/git
+ PS1='[\u@${IMAGE} \W$(__git_ps1 " (%s)")]\$ '
+ fi
+ else
+ PS1='[\u@${IMAGE} \W$(__git_ps1 " (%s)")]\$ '
+ fi
+
+ export PS1
+
+ PROMPT_COMMAND="echo -ne '\033]0;${IMAGE} (in ${HOSTNAME})\007'"
+
+ if [ -f "/usr/share/git-core/contrib/completion/git-prompt.sh" ]; then
+ source /usr/share/git-core/contrib/completion/git-prompt.sh
+ fi
+fi
+
+if [ ! -d "/srv/${PACKAGE}.git" ]; then
+ git clone ${RO_URI} /srv/${PACKAGE}.git
+
+ pushd /srv/${PACKAGE}.git
+
+ for branch in $(git branch -la | sed -e 's/^* //g' -e 's/ //g' -e '/remotes\/origin\/HEAD/d' -e 's|remotes/origin/||g' | sort -u); do
+ git checkout $branch
+ done
+
+ popd
+else
+ pushd /srv/${PACKAGE}.git
+
+ git remote set-url origin ${RO_URI}
+ git fetch origin
+ git reset --hard origin/master
+ git clean -d -f -x
+
+ for branch in $(git branch -la | sed -e 's/^* //g' -e '/\(detached from/d' -e 's/ //g' -e '/remotes\/origin\/HEAD/d' -e 's|remotes/origin/||g' | sort -u); do
+ git checkout $branch
+ done
+
+ popd
+fi
+
+retval=0
+
+if [ -x "$(which yum 2>/dev/null)" ]; then
+ yum clean metadata; retval=$(( ${retval} + $? ))
+ yum -y update; retval=$(( ${retval} + $? ))
+ rpmdev-setuptree; retval=$(( ${retval} + $? ))
+elif [ -x "$(which apt-get 2>/dev/null)" ]; then
+ apt-get update; retval=$(( ${retval} + $? ))
+fi
+
+pushd /srv/${PACKAGE}.git
+
+if [ ! -z "${COMMIT}" ]; then
+ git checkout ${COMMIT}; retval=$(( ${retval} + $? ))
+fi
+
+# TODO: A differential has a base commit.
+
+if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+fi
+
+if [ -x "../stick.git/drydocker/${PACKAGE}/test_build.sh" -a ${TEST_BUILD} -eq 1 ]; then
+ retval=$(_shell ../stick.git/drydocker/${PACKAGE}/test_build.sh)
+ if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+ fi
+fi
+
+if [ -x "../stick.git/drydocker/${PACKAGE}/test_unit.sh" -a ${TEST_UNIT} -eq 1 ]; then
+ retval=$(_shell ../stick.git/drydocker/${PACKAGE}/test_unit.sh)
+ if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+ fi
+fi
+
+if [ -x "../stick.git/drydocker/${PACKAGE}/test_functional.sh" -a ${TEST_FUNCTIONAL} -eq 1 ]; then
+ retval=$(_shell ../stick.git/drydocker/${PACKAGE}/test_functional.sh)
+ if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+ fi
+fi
+
+if [ -x "../stick.git/drydocker/${PACKAGE}/test_obs.sh" ]; then
+ retval=$(_shell ../stick.git/drydocker/${PACKAGE}/test_obs.sh)
+ if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+ fi
+fi
+
+if [ -x "../stick.git/drydocker/${PACKAGE}/test_integration.sh" -a ${TEST_INTEGRATION} -eq 1 ]; then
+ retval=$(_shell ../stick.git/drydocker/${PACKAGE}/test_integration.sh)
+ if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+ fi
+fi
+
+if [ -x "../stick.git/drydocker/${PACKAGE}/test_obs_checkin.sh" ]; then
+ retval=$(_shell ../stick.git/drydocker/${PACKAGE}/test_obs_checkin.sh)
+ if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+ fi
+fi
+
+popd
+
+_report
diff --git a/99-ci-jessie/functions.sh b/99-ci-jessie/functions.sh
new file mode 100644
index 0000000..27a9d32
--- /dev/null
+++ b/99-ci-jessie/functions.sh
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+# Create 3 as an alias for 1, so the _shell function
+# can output data without the caller getting the input.
+exec 3>&1
+
+function _report {
+ echo $(printf '%0.1s' "="{1..72})
+ cat ${TMPDIR:-/tmp}/report.log
+ rm -rf ${TMPDIR:-/tmp}/report.log
+ echo $(printf '%0.1s' "="{1..72})
+}
+
+export -f _report
+
+function _report_msg {
+ printf "%*s" $(( ( ${BASH_SUBSHELL} - 1 ) * 4 )) " " >> ${TMPDIR:-/tmp}/report.log
+ echo "$@" >> ${TMPDIR:-/tmp}/report.log
+}
+
+export -f _report_msg
+
+function _shell {
+ revision=$(git rev-parse HEAD 2>/dev/null)
+ if [ -z "${revision}" ]; then
+ pushd /srv/${PACKAGE}.git >/dev/null 2>&1 3>&1
+ revision=$(git rev-parse HEAD 2>/dev/null)
+ popd >/dev/null 2>&1 3>&1
+ fi
+
+ if [ -z "${revision}" ]; then
+ revision=unknown
+ fi
+
+ echo "Running $@ ..." >&3
+ $@ >&3 2>&3 ; retval=$?
+
+ if [ ${retval} -eq 0 ]; then
+ _report_msg "Running '$@' OK (at ${revision})"
+ echo "Running $@ OK (at ${revision})" >&3
+ else
+ _report_msg "Running '$@' FAILED (at ${revision})"
+ echo "Running $@ FAILED (at ${revision})" >&3
+ fi
+
+ echo ${retval}
+}
+
+export -f _shell
+
+function _install_package {
+ if [ -x "$(which yum 2>/dev/null)" ]; then
+ yum -y install $@
+ elif [ -x "$(which apt-get 2>/dev/null)" ]; then
+ apt-get -y install $@
+ fi
+}
+
+function _install_package_builddep {
+ if [ -x "$(which yum 2>/dev/null)" ]; then
+ yum-builddep -y --disablerepo=openSUSE_Tools $@
+ elif [ -x "$(which apt-get 2>/dev/null)" ]; then
+ apt-get -y build-dep $@
+ fi
+}
diff --git a/99-ci-maipo/Dockerfile b/99-ci-maipo/Dockerfile
index 05c2363..bb039ae 100644
--- a/99-ci-maipo/Dockerfile
+++ b/99-ci-maipo/Dockerfile
@@ -4,17 +4,12 @@ MAINTAINER Kolab Systems <vanmeeuwen@kolabsys.com>
ADD http://obs.kolabsys.com/repositories/Kolab:/Winterfell/CentOS_7/Kolab:Winterfell.repo \
/etc/yum.repos.d/Kolab:Winterfell.repo
-ADD http://obs.kolabsys.com/repositories/Kolab:/3.4/CentOS_7/Kolab:3.4.repo \
- /etc/yum.repos.d/Kolab:3.4.repo
-
-ADD http://obs.kolabsys.com/repositories/Kolab:/3.4:/Updates/CentOS_7/Kolab:3.4:Updates.repo \
- /etc/yum.repos.d/Kolab:3.4:Updates.repo
+ADD http://obs.kolabsys.com/repositories/Kolab:/3.4/CentOS_7/Kolab:16.repo \
+ /etc/yum.repos.d/Kolab:16.repo
RUN echo "priority=60" >> /etc/yum.repos.d/Kolab:Winterfell.repo
-RUN echo "priority=60" >> /etc/yum.repos.d/Kolab:3.4.repo
-
-RUN echo "priority=60" >> /etc/yum.repos.d/Kolab:3.4:Updates.repo
+RUN echo "priority=60" >> /etc/yum.repos.d/Kolab:16.repo
RUN rpm --import https://ssl.kolabsys.com/community.asc
@@ -29,9 +24,6 @@ RUN sed -i \
/etc/yum.conf && \
sed -r -i -e 's/enabled\s*=\s*1/enabled=0/g' /etc/yum/pluginconf.d/fastestmirror.conf
-#RUN yum -y reinstall \* && \
-# yum clean all
-
ENV IMAGE maipo
ADD /dbus.service /etc/systemd/system/dbus.service
@@ -93,26 +85,9 @@ RUN wget \
-O/usr/local/lib/selenium-server-standalone.jar \
http://mirror.kolabsys.com/pub/releases/selenium-server-standalone.jar
-#WORKDIR /srv
-#RUN git clone https://github.com/SeleniumHQ/selenium.git selenium.git
-#WORKDIR /srv/selenium.git
-#RUN ./go --trace --verbose build
-#RUN ./go selenium-server-standalone
-
-WORKDIR /srv
-RUN wget http://mirror.kolabsys.com/pub/releases/phantomjs-1.9.7-linux-x86_64.tar.bz2 && \
- tar jxvf phantomjs-1.9.7-linux-x86_64.tar.bz2 && \
- cp phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/bin/ && \
- rm -rf phantomjs-1.9.7-linux-x86_64*
-
-#WORKDIR /srv/
-#RUN git clone https://github.com/ariya/phantomjs.git phantomjs.git
-#WORKDIR /srv/phantomjs.git
-#RUN ./build.sh --confirm
-
-ADD /functions.sh /
-ADD entrypoint.sh /
+ADD /functions.sh /functions.sh
+ADD /entrypoint.sh /entrypoint.sh
-RUN chmod 755 /entrypoint.sh
+RUN chmod a+x /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
diff --git a/99-ci-trusty/Dockerfile b/99-ci-trusty/Dockerfile
index 7d97f5a..f73d855 100644
--- a/99-ci-trusty/Dockerfile
+++ b/99-ci-trusty/Dockerfile
@@ -5,11 +5,18 @@ MAINTAINER Jeroen van Meeuwen <vanmeeuwen@kolabsys.com>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
- apt-get -y install wget
+ apt-get -y install \
+ aptitude \
+ git \
+ wget && \
+ apt-get clean
ADD /kolab.list /etc/apt/sources.list.d/kolab.list
RUN wget -q -O- http://obs.kolabsys.com/repositories/Kolab:/Winterfell/Ubuntu_14.04/Release.key | apt-key add -
-RUN apt-get update && \
- apt-get -y install kolab
+ADD /functions.sh /functions.sh
+ADD /entrypoint.sh /entrypoint.sh
+RUN chmod a+x /entrypoint.sh
+
+ENTRYPOINT [ "/entrypoint.sh" ]
diff --git a/99-ci-trusty/entrypoint.sh b/99-ci-trusty/entrypoint.sh
new file mode 100755
index 0000000..a099eca
--- /dev/null
+++ b/99-ci-trusty/entrypoint.sh
@@ -0,0 +1,148 @@
+#!/bin/bash
+
+if [ ! -d "/srv/stick.git" ]; then
+ git clone https://git.kolab.org/diffusion/QA/stick.git /srv/stick.git
+elif [ -z "${PS1}" ]; then
+ pushd /srv/stick.git
+ git remote set-url origin https://git.kolab.org/diffusion/QA/stick.git
+ git fetch origin
+ git reset --hard origin/master
+ git clean -d -f -x
+ popd
+fi
+
+source /functions.sh
+
+export TEST_BUILD=${TEST_BUILD:-0}
+export TEST_FUNCTIONAL=${TEST_FUNCTIONAL:-0}
+export TEST_INTEGRATION=${TEST_INTEGRATION:-0}
+export TEST_PERFORMANCE=${TEST_PERFORMANCE:-0}
+export TEST_UNIT=${TEST_UNIT:-0}
+export TEST_OBS=${TEST_OBS:-0}
+
+# If PS1 is set, we're interactive
+if [ ! -z "${PS1}" ]; then
+ # Set a sensible prompt
+ PS1='[\u@${IMAGE} \W]\$ '
+
+ export GIT_PS1_SHOWDIRTYSTATE=1
+ export GIT_PS1_SHOWUNTRACKEDFILES=1
+ export GIT_PS1_SHOWUPSTREAM="auto verbose"
+
+ if [ ! -f "/etc/bash_completion" ]; then
+ if [ -f "/etc/bash_completion.d/git" ]; then
+ . /etc/bash_completion.d/git
+ PS1='[\u@${IMAGE} \W$(__git_ps1 " (%s)")]\$ '
+ fi
+ else
+ PS1='[\u@${IMAGE} \W$(__git_ps1 " (%s)")]\$ '
+ fi
+
+ export PS1
+
+ PROMPT_COMMAND="echo -ne '\033]0;${IMAGE} (in ${HOSTNAME})\007'"
+
+ if [ -f "/usr/share/git-core/contrib/completion/git-prompt.sh" ]; then
+ source /usr/share/git-core/contrib/completion/git-prompt.sh
+ fi
+fi
+
+if [ ! -d "/srv/${PACKAGE}.git" ]; then
+ git clone ${RO_URI} /srv/${PACKAGE}.git
+
+ pushd /srv/${PACKAGE}.git
+
+ for branch in $(git branch -la | sed -e 's/^* //g' -e 's/ //g' -e '/remotes\/origin\/HEAD/d' -e 's|remotes/origin/||g' | sort -u); do
+ git checkout $branch
+ done
+
+ popd
+else
+ pushd /srv/${PACKAGE}.git
+
+ git remote set-url origin ${RO_URI}
+ git fetch origin
+ git reset --hard origin/master
+ git clean -d -f -x
+
+ for branch in $(git branch -la | sed -e 's/^* //g' -e '/\(detached from/d' -e 's/ //g' -e '/remotes\/origin\/HEAD/d' -e 's|remotes/origin/||g' | sort -u); do
+ git checkout $branch
+ done
+
+ popd
+fi
+
+retval=0
+
+if [ -x "$(which yum 2>/dev/null)" ]; then
+ yum clean metadata; retval=$(( ${retval} + $? ))
+ yum -y update; retval=$(( ${retval} + $? ))
+ rpmdev-setuptree; retval=$(( ${retval} + $? ))
+elif [ -x "$(which apt-get 2>/dev/null)" ]; then
+ apt-get update; retval=$(( ${retval} + $? ))
+fi
+
+pushd /srv/${PACKAGE}.git
+
+if [ ! -z "${COMMIT}" ]; then
+ git checkout ${COMMIT}; retval=$(( ${retval} + $? ))
+fi
+
+# TODO: A differential has a base commit.
+
+if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+fi
+
+if [ -x "../stick.git/drydocker/${PACKAGE}/test_build.sh" -a ${TEST_BUILD} -eq 1 ]; then
+ retval=$(_shell ../stick.git/drydocker/${PACKAGE}/test_build.sh)
+ if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+ fi
+fi
+
+if [ -x "../stick.git/drydocker/${PACKAGE}/test_unit.sh" -a ${TEST_UNIT} -eq 1 ]; then
+ retval=$(_shell ../stick.git/drydocker/${PACKAGE}/test_unit.sh)
+ if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+ fi
+fi
+
+if [ -x "../stick.git/drydocker/${PACKAGE}/test_functional.sh" -a ${TEST_FUNCTIONAL} -eq 1 ]; then
+ retval=$(_shell ../stick.git/drydocker/${PACKAGE}/test_functional.sh)
+ if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+ fi
+fi
+
+if [ -x "../stick.git/drydocker/${PACKAGE}/test_obs.sh" ]; then
+ retval=$(_shell ../stick.git/drydocker/${PACKAGE}/test_obs.sh)
+ if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+ fi
+fi
+
+if [ -x "../stick.git/drydocker/${PACKAGE}/test_integration.sh" -a ${TEST_INTEGRATION} -eq 1 ]; then
+ retval=$(_shell ../stick.git/drydocker/${PACKAGE}/test_integration.sh)
+ if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+ fi
+fi
+
+if [ -x "../stick.git/drydocker/${PACKAGE}/test_obs_checkin.sh" ]; then
+ retval=$(_shell ../stick.git/drydocker/${PACKAGE}/test_obs_checkin.sh)
+ if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+ fi
+fi
+
+popd
+
+_report
diff --git a/99-ci-trusty/functions.sh b/99-ci-trusty/functions.sh
new file mode 100644
index 0000000..27a9d32
--- /dev/null
+++ b/99-ci-trusty/functions.sh
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+# Create 3 as an alias for 1, so the _shell function
+# can output data without the caller getting the input.
+exec 3>&1
+
+function _report {
+ echo $(printf '%0.1s' "="{1..72})
+ cat ${TMPDIR:-/tmp}/report.log
+ rm -rf ${TMPDIR:-/tmp}/report.log
+ echo $(printf '%0.1s' "="{1..72})
+}
+
+export -f _report
+
+function _report_msg {
+ printf "%*s" $(( ( ${BASH_SUBSHELL} - 1 ) * 4 )) " " >> ${TMPDIR:-/tmp}/report.log
+ echo "$@" >> ${TMPDIR:-/tmp}/report.log
+}
+
+export -f _report_msg
+
+function _shell {
+ revision=$(git rev-parse HEAD 2>/dev/null)
+ if [ -z "${revision}" ]; then
+ pushd /srv/${PACKAGE}.git >/dev/null 2>&1 3>&1
+ revision=$(git rev-parse HEAD 2>/dev/null)
+ popd >/dev/null 2>&1 3>&1
+ fi
+
+ if [ -z "${revision}" ]; then
+ revision=unknown
+ fi
+
+ echo "Running $@ ..." >&3
+ $@ >&3 2>&3 ; retval=$?
+
+ if [ ${retval} -eq 0 ]; then
+ _report_msg "Running '$@' OK (at ${revision})"
+ echo "Running $@ OK (at ${revision})" >&3
+ else
+ _report_msg "Running '$@' FAILED (at ${revision})"
+ echo "Running $@ FAILED (at ${revision})" >&3
+ fi
+
+ echo ${retval}
+}
+
+export -f _shell
+
+function _install_package {
+ if [ -x "$(which yum 2>/dev/null)" ]; then
+ yum -y install $@
+ elif [ -x "$(which apt-get 2>/dev/null)" ]; then
+ apt-get -y install $@
+ fi
+}
+
+function _install_package_builddep {
+ if [ -x "$(which yum 2>/dev/null)" ]; then
+ yum-builddep -y --disablerepo=openSUSE_Tools $@
+ elif [ -x "$(which apt-get 2>/dev/null)" ]; then
+ apt-get -y build-dep $@
+ fi
+}
diff --git a/99-ci-xenial/Dockerfile b/99-ci-xenial/Dockerfile
index adf7b08..13df2c9 100644
--- a/99-ci-xenial/Dockerfile
+++ b/99-ci-xenial/Dockerfile
@@ -5,11 +5,18 @@ MAINTAINER Jeroen van Meeuwen <vanmeeuwen@kolabsys.com>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
- apt-get -y install wget
+ apt-get -y install \
+ aptitude \
+ git \
+ wget && \
+ apt-get clean
ADD /kolab.list /etc/apt/sources.list.d/kolab.list
RUN wget -q -O- http://obs.kolabsys.com/repositories/Kolab:/Winterfell/Ubuntu_16.04/Release.key | apt-key add -
-RUN apt-get update && \
- apt-get -y install kolab || :
+ADD /functions.sh /functions.sh
+ADD /entrypoint.sh /entrypoint.sh
+RUN chmod a+x /entrypoint.sh
+
+ENTRYPOINT [ "/entrypoint.sh" ]
diff --git a/99-ci-xenial/entrypoint.sh b/99-ci-xenial/entrypoint.sh
new file mode 100755
index 0000000..a099eca
--- /dev/null
+++ b/99-ci-xenial/entrypoint.sh
@@ -0,0 +1,148 @@
+#!/bin/bash
+
+if [ ! -d "/srv/stick.git" ]; then
+ git clone https://git.kolab.org/diffusion/QA/stick.git /srv/stick.git
+elif [ -z "${PS1}" ]; then
+ pushd /srv/stick.git
+ git remote set-url origin https://git.kolab.org/diffusion/QA/stick.git
+ git fetch origin
+ git reset --hard origin/master
+ git clean -d -f -x
+ popd
+fi
+
+source /functions.sh
+
+export TEST_BUILD=${TEST_BUILD:-0}
+export TEST_FUNCTIONAL=${TEST_FUNCTIONAL:-0}
+export TEST_INTEGRATION=${TEST_INTEGRATION:-0}
+export TEST_PERFORMANCE=${TEST_PERFORMANCE:-0}
+export TEST_UNIT=${TEST_UNIT:-0}
+export TEST_OBS=${TEST_OBS:-0}
+
+# If PS1 is set, we're interactive
+if [ ! -z "${PS1}" ]; then
+ # Set a sensible prompt
+ PS1='[\u@${IMAGE} \W]\$ '
+
+ export GIT_PS1_SHOWDIRTYSTATE=1
+ export GIT_PS1_SHOWUNTRACKEDFILES=1
+ export GIT_PS1_SHOWUPSTREAM="auto verbose"
+
+ if [ ! -f "/etc/bash_completion" ]; then
+ if [ -f "/etc/bash_completion.d/git" ]; then
+ . /etc/bash_completion.d/git
+ PS1='[\u@${IMAGE} \W$(__git_ps1 " (%s)")]\$ '
+ fi
+ else
+ PS1='[\u@${IMAGE} \W$(__git_ps1 " (%s)")]\$ '
+ fi
+
+ export PS1
+
+ PROMPT_COMMAND="echo -ne '\033]0;${IMAGE} (in ${HOSTNAME})\007'"
+
+ if [ -f "/usr/share/git-core/contrib/completion/git-prompt.sh" ]; then
+ source /usr/share/git-core/contrib/completion/git-prompt.sh
+ fi
+fi
+
+if [ ! -d "/srv/${PACKAGE}.git" ]; then
+ git clone ${RO_URI} /srv/${PACKAGE}.git
+
+ pushd /srv/${PACKAGE}.git
+
+ for branch in $(git branch -la | sed -e 's/^* //g' -e 's/ //g' -e '/remotes\/origin\/HEAD/d' -e 's|remotes/origin/||g' | sort -u); do
+ git checkout $branch
+ done
+
+ popd
+else
+ pushd /srv/${PACKAGE}.git
+
+ git remote set-url origin ${RO_URI}
+ git fetch origin
+ git reset --hard origin/master
+ git clean -d -f -x
+
+ for branch in $(git branch -la | sed -e 's/^* //g' -e '/\(detached from/d' -e 's/ //g' -e '/remotes\/origin\/HEAD/d' -e 's|remotes/origin/||g' | sort -u); do
+ git checkout $branch
+ done
+
+ popd
+fi
+
+retval=0
+
+if [ -x "$(which yum 2>/dev/null)" ]; then
+ yum clean metadata; retval=$(( ${retval} + $? ))
+ yum -y update; retval=$(( ${retval} + $? ))
+ rpmdev-setuptree; retval=$(( ${retval} + $? ))
+elif [ -x "$(which apt-get 2>/dev/null)" ]; then
+ apt-get update; retval=$(( ${retval} + $? ))
+fi
+
+pushd /srv/${PACKAGE}.git
+
+if [ ! -z "${COMMIT}" ]; then
+ git checkout ${COMMIT}; retval=$(( ${retval} + $? ))
+fi
+
+# TODO: A differential has a base commit.
+
+if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+fi
+
+if [ -x "../stick.git/drydocker/${PACKAGE}/test_build.sh" -a ${TEST_BUILD} -eq 1 ]; then
+ retval=$(_shell ../stick.git/drydocker/${PACKAGE}/test_build.sh)
+ if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+ fi
+fi
+
+if [ -x "../stick.git/drydocker/${PACKAGE}/test_unit.sh" -a ${TEST_UNIT} -eq 1 ]; then
+ retval=$(_shell ../stick.git/drydocker/${PACKAGE}/test_unit.sh)
+ if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+ fi
+fi
+
+if [ -x "../stick.git/drydocker/${PACKAGE}/test_functional.sh" -a ${TEST_FUNCTIONAL} -eq 1 ]; then
+ retval=$(_shell ../stick.git/drydocker/${PACKAGE}/test_functional.sh)
+ if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+ fi
+fi
+
+if [ -x "../stick.git/drydocker/${PACKAGE}/test_obs.sh" ]; then
+ retval=$(_shell ../stick.git/drydocker/${PACKAGE}/test_obs.sh)
+ if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+ fi
+fi
+
+if [ -x "../stick.git/drydocker/${PACKAGE}/test_integration.sh" -a ${TEST_INTEGRATION} -eq 1 ]; then
+ retval=$(_shell ../stick.git/drydocker/${PACKAGE}/test_integration.sh)
+ if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+ fi
+fi
+
+if [ -x "../stick.git/drydocker/${PACKAGE}/test_obs_checkin.sh" ]; then
+ retval=$(_shell ../stick.git/drydocker/${PACKAGE}/test_obs_checkin.sh)
+ if [ ${retval} -ne 0 ]; then
+ _report
+ exit 1
+ fi
+fi
+
+popd
+
+_report
diff --git a/99-ci-xenial/functions.sh b/99-ci-xenial/functions.sh
new file mode 100644
index 0000000..27a9d32
--- /dev/null
+++ b/99-ci-xenial/functions.sh
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+# Create 3 as an alias for 1, so the _shell function
+# can output data without the caller getting the input.
+exec 3>&1
+
+function _report {
+ echo $(printf '%0.1s' "="{1..72})
+ cat ${TMPDIR:-/tmp}/report.log
+ rm -rf ${TMPDIR:-/tmp}/report.log
+ echo $(printf '%0.1s' "="{1..72})
+}
+
+export -f _report
+
+function _report_msg {
+ printf "%*s" $(( ( ${BASH_SUBSHELL} - 1 ) * 4 )) " " >> ${TMPDIR:-/tmp}/report.log
+ echo "$@" >> ${TMPDIR:-/tmp}/report.log
+}
+
+export -f _report_msg
+
+function _shell {
+ revision=$(git rev-parse HEAD 2>/dev/null)
+ if [ -z "${revision}" ]; then
+ pushd /srv/${PACKAGE}.git >/dev/null 2>&1 3>&1
+ revision=$(git rev-parse HEAD 2>/dev/null)
+ popd >/dev/null 2>&1 3>&1
+ fi
+
+ if [ -z "${revision}" ]; then
+ revision=unknown
+ fi
+
+ echo "Running $@ ..." >&3
+ $@ >&3 2>&3 ; retval=$?
+
+ if [ ${retval} -eq 0 ]; then
+ _report_msg "Running '$@' OK (at ${revision})"
+ echo "Running $@ OK (at ${revision})" >&3
+ else
+ _report_msg "Running '$@' FAILED (at ${revision})"
+ echo "Running $@ FAILED (at ${revision})" >&3
+ fi
+
+ echo ${retval}
+}
+
+export -f _shell
+
+function _install_package {
+ if [ -x "$(which yum 2>/dev/null)" ]; then
+ yum -y install $@
+ elif [ -x "$(which apt-get 2>/dev/null)" ]; then
+ apt-get -y install $@
+ fi
+}
+
+function _install_package_builddep {
+ if [ -x "$(which yum 2>/dev/null)" ]; then
+ yum-builddep -y --disablerepo=openSUSE_Tools $@
+ elif [ -x "$(which apt-get 2>/dev/null)" ]; then
+ apt-get -y build-dep $@
+ fi
+}