\documentclass{article}
\usepackage{ulem}
\usepackage{graphicx}
\usepackage{hyperref}
\pagestyle{headings}
\begin{document}
This page describes a previous hudson/jenkins based approach. Repository layout has changed from monolithic horde repo to per-package repos. Also, current CI mostly depends on travis hosted by github.com

+Continuous Integration

The <a href="http://ci.horde.org">continuous integration system for Horde</a> constantly monitors the integrity of the Horde build, does quality control checks, and publishes the resulting data.

The system is based on <a href="http://hudson-ci.org">Hudson</a> and uses the <a href="http://github.com/wrobel/php-hudson-tools">PHP Hudson tools</a> as build environment.

You should be able to get the same system up and running in no time on your local machine.

++Prerequisites

For the following to work there are a few elements required on your machine:

\begin{itemize}
\item Make


\item PHP with the xdebug extension


\item PEAR


\item Java (Sun JDK)


\item Ant


\end{itemize}
++Installation

Clone the <a href="http://github.com/horde/horde-support">Horde Support</a> repository first:

<pre><code>
git clone git://github.com/horde/horde-support.git
</code></pre>
As a first step we will install Hudson and all the plugins we need to cater for the tools used when running the build:

<pre><code>
cd horde-support/ci-hudson
make install
</code></pre>
Now you can start Hudson (it will listen to the default port 8080 unless you don't modify anything in \texttt{etc/hudson}.

<pre><code>
make start
</code></pre>
The command should start the Hudson daemon with no output. Check that Hudson is running and can be reached via the network (e.g. \texttt{localhost:8080}). Now you should be able to login as a standard user from your system.

At this time none of the jobs will have been build. To start the process all you need to do is to trigger the \texttt{php-hudson-tools} job once.

++Adding new jobs

New jobs should be added locally first in order to test them before they are ran on <a href="http://ci.horde.org">ci.horde.org</a> as any failing build there results in mails to the \texttt{commits@horde.org} mailing list.

Adding a new job is simple. Insert the framework package name in the \texttt{Makefile} within \texttt{horde-support/ci-hudson}:

<pre><code>
JOBS=Autoloader \textbackslash\{\}
     Argv \textbackslash\{\}
     Constraint \textbackslash\{\}
     Controller \textbackslash\{\}
     ...
     New\_Job \textbackslash\{\}
     ...
</code></pre>
In order to prepare this job you now need to setup the basic configuration for it by running

<pre><code>
make job-New\_Job
</code></pre>
Restart your Hudson from within Hudson ("Manage Hudson" -> "Reload") and configure both the \texttt{horde} and the \texttt{php-hudson-tools} job to trigger the new job. Trigger the new job or \texttt{horde} now and verify the job builds.

If it does you should copy the \texttt{.gitignore} file from another job to the directory of the new job. Finally you can commit the new configuration to the \texttt{horde-support} repository. Ping [mailto:<a href="https://wiki.horde.org/mailto:wrobel@horde.org">wrobel@horde.org</a> Gunnar] to get the job included on <a href="http://ci.horde.org">ci.horde.org</a>.

++ci.horde.org

As a Horde developer you should be able to log into Hudson via your usual Horde developer credentials. You have full rights to start/stop builds and administrate the Hudson installation.

++Problems

+++I cannot login

Try to disable the security feature at least temporarily so that you are able to enter the system. Once you changed to a security configuration that should allow you to login to the system you can turn the protection back on.

Edit \texttt{workdir/config.xml} and ensure the \texttt{useSecurity} setting is set to \texttt{false}:

<pre><code>
<useSecurity>false</useSecurity>
</code></pre>
Now restart Hudson on the command line with:

<pre><code>
init.d/hudson start
init.d/hudson stop
</code></pre>
After you modified the security settings to your liking you need to restart Hudson again. This time you should be able to do this from within Hudson ("Manage Hudson" -> "Reload").

\end{document}
