Project

General

Profile

Jenkins » History » Version 6

laforge, 07/10/2017 01:23 PM
explain how to build like jenkins

1 6 laforge
{{>toc}}
2 1 zecke2
3 4 laforge
h1. Continuous Integration with Jenkins
4 1 zecke2
5 4 laforge
h2. What
6 1 zecke2
7 6 laforge
The Osmocom Cellular Infrastructure software stack has grown to a size where it make sense to somehow track the state after each commit. The "Jenkins Software":https://jenkins.io/ allows us to do this. The installation can be found at http://jenkins.osmocom.org/jenkins and all of Osmocom is tracked there. The goal is to have all projects/repositories of the osmocom umbrella tracked there. 
8 1 zecke2
9 5 laforge
We are happy if people donate CPU time to be used as additional nodes to execute the compile jobs. Please contact laforge@gnumonks.org if you want to donate some.
10
11 4 laforge
h2. How
12 3 zecke2
13 1 zecke2
We are using Jenkins as it comes from the FreeBSD port system. It runs using the standalone servlet container (Winstone Servlet Engine) and is behind one (IPv6) or two (IPv4) cherokee reverse proxies. Currently there are two nodes FreeBSD 8.2/AMD64 and Debian Squeeze/i386 ( running on the FreeBSD kernel, any weirdness might be a broken syscall implementation).
14
15 6 laforge
h3. Custom Build Helper Scripts
16 1 zecke2
17 6 laforge
If you look into the jenkins job configuration of the individual jobs, you will notice that they use a custom helper script that is part of each Osmocom projects' git repository: @contrib/jenkins.sh@ (for an example, see http://git.osmocom.org/libosmo-netif/tree/contrib/jenkins.sh)
18 5 laforge
19 6 laforge
This @contrib/jenkins.sh@ expects that some common helper scripts from http://git.osmocom.org/osmo-ci are in your PATH at the time of execution.  The common helper scripts (such as @osmo-deps.sh@ or @osmo-build-dep.sh@).  Those helpers perform tasks similar to all osmocom projects, i.e. clone/update a dependency in the workspace of a build node.  The script will try to @git-clone@, @git-fetch@, @git-reset --hard@ the dependency.
20 3 zecke2
21 6 laforge
h4. Building code like jenkins build slave would do it
22
23
During development, it sometimes is useful to build the code just like it is built on the jenkins build slave.
24
25
If you would like to do that, you should
26
# @git clone git://git.osmocom.org/osmo-ci@
27
# set your shell @PATH@ to include the @osmo-ci/scripts@ directory
28
# set the @MAKE@ environment variable to your make command (@make@ or @gmake@)
29
# go to the root directory of the respective project git repo (e.g. libosmo-netif)
30
# execute @./contrib/jenkins.sh@
31 3 zecke2
32 4 laforge
33 3 zecke2
h3. FreeBSD 8.2 and Osmocom
34
35 5 laforge
Not everything is required to build on GNU/Linux systems, for SIMtrace a fake libusb-1.0.pc was created to point to the /usr/include,/usr/lib for libusb, all dependencies (fftw, erlang, autotools...) were installed through the port system
36 3 zecke2
37 1 zecke2
38
h3. Debian/Squeeze
39
40 5 laforge
Normal Debian/Squeeze installation, all dependencies installed via the apt/dpkg package system. The arm-elf-gcc toolchain is installed using the toolchain script of the bb.osmocom.org wiki.
Add picture from clipboard (Maximum size: 48.8 MB)