Jenkins is a powerful, extensible Continues Integration Server developed in Java. It can be used to build and test PHP projects automatically on every new commit. For more information visit the Jenkins Page.
There exists no ebuild for Jenkins in the portage tree. But the Jenkins page pointed me to an alternate ebuild location. As first step configure layman to work with this repository. This can be done by editing the file /etc/layman/layman.cfgto add the new repository location to the overlay list.
Execute the next two commands to add the overlay to layman.
After adding the ebuild to the package.keywords file, emerge the package dev-util/jenkins-bin.
Jenkins provides a configuration file in /etc/conf.d/jenkins. Normally this file needn't be changed to run the server. The only thing that can make trouble with other services running, is the port on which Jenkins listens. Change this to your needs.
Try running the server. If it fails on start, look in the log file /var/log/jenkins/jenkins.log for detailed informations. To start the service at boot time add it to the default runlevel.
Open your browser and surf to http://localhost:8080. You should see the Jenkins interface. To make Jenkins available under its own domain on port 80, create the file /etc/apache2/vhosts.d/01_your.domain.com.conf with the following content.
This configuration needs the modules mod_proxy and proxy_http compiled into apache. To compile these modules into the Apache server you must add they to the APACHE2_MODULES variable in /etc/make.conf.
Now recompile the apache server and activate the module in the file /etc/conf.d/apache2. Search the line APACHE2_OPTS=" and add the -D PROXY part to it.
After restarting the apache server you should be able to configure the Jenkins server over the new domain.
For a good tutorial on how you can setup jobs for PHP projects using Sebastian Bergmanns Template for Jenkins Jobs or visit this blog entry on test.ical.ly.