Jenkins CI Server: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
==URLs==
The openpetra-Jenkin-Servers can be found on
* http://ci.openpetra.org/ and
* http://ci-win.solidcharity.com/
== Ubuntu ==
== Ubuntu ==
* installed on Ubuntu 11.10 (Oneiric Ocelot)
* installed on Ubuntu 11.10 (Oneiric Ocelot)
Line 94: Line 99:
Jenkins can also be a help translating openpetra.
Jenkins can also be a help translating openpetra.
By this, translators can work on a translation online and on the next day get an installer including already their translated items. This makes it easier for translators because then they can see their translations right away.
By this, translators can work on a translation online and on the next day get an installer including already their translated items. This makes it easier for translators because then they can see their translations right away.


[We tried "Nullsoft Install" for building Windows Installers but due to some complications there's now running aswell a windows-Jenkins which uses InnoSetup to build the windows Installer.]
You can get the Nightly Build [http://ci-win.solidcharity.com/job/OpenPetraBuildWin/ here]. Please download the exe-file OpenPetraSetup-x.x.xx.xxxx.exe
 
(We tried "Nullsoft Install" for building Windows Installers but due to some complications there's now running aswell a windows-Jenkins which uses InnoSetup to build the windows Installer.)

Revision as of 02:56, 9 August 2012

URLs

The openpetra-Jenkin-Servers can be found on

Ubuntu

  • installed on Ubuntu 11.10 (Oneiric Ocelot)
apt-get remove apache bind9

Mono

  • using Mono 2.10 for best support for c# 4.0 etc
apt-get install mono-runtime mono-xbuild mono-gmcs
  • for msgfmt to work for the i18n, processing of language files, you need to run:
ln -s /usr/bin/gmcs /usr/bin/mcs

other development tools

apt-get install bzr doxygen graphviz sqlite3 postgresql libpg-java dos2unix fakeroot lintian nsis

setup SchemaSpy

cd /var/tmp/OpenPetraBuild
vi /etc/postgresql/9.1/main/pg_hba.conf and add at top: local   all             petraserver     md5
nant recreateDatabase resetDatabase -D:DBMS.Type=postgresql
java -jar schemaSpy_5.0.0.jar -t pgsql -dp /usr/share/java/postgresql-jdbc4.jar -host localhost:5432 -db openpetra -u petraserver -p petra -s public -o outputDir

NAnt

  • apt-get install nant
  • then download latest NAnt, NAnt 0.91 Release
  • unpack tar.gz file to /usr/local/nant-0.91
  • modify /usr/bin/nant and point at /usr/local/nant-0.91/bin/NAnt.exe


  • somehow, there is a problem when building for mono-2.0 or mono-4.0. The solution is to have two NAnt profiles:
the default /usr and the other is /usr/local/nant-for-4.0

/usr/bin/nant:

#!/bin/sh
#exec /usr/bin/cli /usr/lib/NAnt/NAnt.exe "$@"
mono --runtime=v2.0 /usr/local/nant-0.91/bin/NAnt.exe "$@"

/usr/local/nant-for-4.0/bin/nant:

#!/bin/sh
#exec /usr/bin/cli /usr/lib/NAnt/NAnt.exe "$@"
mono --runtime=v4.0 /usr/local/nant-0.91/bin/NAnt.exe "$@"

Jenkins

wget -q -O - http://pkg.jenkins-ci.org/debian-stable/jenkins-ci.org.key | sudo apt-key add -
vi /etc/apt/sources.list:
  deb http://pkg.jenkins-ci.org/debian-stable binary/
apt-get update
apt-get install jenkins
add mod_proxy to the server.modules list, and at the bottom:
proxy.server = (
   "/" => (( "host" => "127.0.0.1", "port" => 8080)),
)
  • installed plugins:
    • Bazaar Plugin [1]
    • DocLinks Plugin [2]
    • Email-ext Plugin [3]
    • Log Parser Plugin [4]
    • NAnt Plugin [5]
    • Build-timeout Plugin [6]

backup

see also https://wiki.jenkins-ci.org/display/JENKINS/Administering+Jenkins

tar czf jenkins.tar.gz --exclude '/var/lib/jenkins/jobs/OpenPetraCodeDoc/javadoc/*' --exclude '/var/lib/jenkins/jobs/OpenPetraCodeDoc/schemaSpy/*' /var/lib/jenkins/

Jenkins on Windows

  • similar setup to Jenkins on Ubuntu
  • http://ci-win.solidcharity.com/
  • the jobs OpenPetraBuildWin and OpenpetraBuildTestWin have their own OpenPetra.build.config file, stored in eg. C:\Program Files (x86)\Jenkins\workspace\OpenPetraBuildWin
<?xml version="1.0"?>
<project name="OpenPetra-userconfig">
   <property name="PostgreSQL.Version" value="9.1"/>
   <property name="DBMS.DBHostOrFile" value="devdb.solidcharity.com"/>
   <property name="DBMS.DBName" value="buildserver"/>
   <property name="DBMS.Setup.DBName" value="openpetra_basedb2"/>
   <property name="DBMS.UserName" value="buildserver"/>
   <property name="DBMS.Password" value="???"/>
   <property name="Server.DebugLevel" value="0"/>
   <property name="Server.Port" value="9432" />
</project>

Additional comments

Jenkins can also be a help translating openpetra. By this, translators can work on a translation online and on the next day get an installer including already their translated items. This makes it easier for translators because then they can see their translations right away.

You can get the Nightly Build here. Please download the exe-file OpenPetraSetup-x.x.xx.xxxx.exe

(We tried "Nullsoft Install" for building Windows Installers but due to some complications there's now running aswell a windows-Jenkins which uses InnoSetup to build the windows Installer.)