Skip to content
Success

Changes

Summary

  1. jenkins-common.sh: add common clean up trap (details)
  2. */jenkins.sh: set -e after setting clean up trap (details)
  3. jenkins-common: put fix_perms() in clean_up_common (details)
  4. osmo-ggsn-master: add configure --enable-gtp-linux (details)
  5. ttcn3-ggsn-test: add kernel test (details)
Commit 12b961942af0c6761573d0632ca0e16339fb33c3 by Oliver Smith
jenkins-common.sh: add common clean up trap

Add set_clean_up_trap() in jenkins-common.sh and run it at the beginning
of the jenkins.sh files. Move the common clean up code from the end of
every jenkins.sh file into clean_up_common(), which gets called by the
trap. Add a custom clean_up() function to those jenkins.sh files that
need additional clean up.

Replace explicit container stop commands (for containers attached to the
docker network) with one call to network_clean() in clean_up_common(). It
kills all containers attached to the docker network.

The motivation for this change is the upcoming optional build of initrd
and kernel during ttcn3-ggsn-test/jenkins.sh. After building these, a
short smoke test will be performed to make sure we can boot the kernel
and initrd, before continuing to run the entire testsuite against it. If
building or the smoke test fails, we must do a proper clean up of the
network and fix permissions.

Related: OS#3208
Change-Id: I807c6221d22fec31db23e2516e477a3eb43347fb
The file was modifiedjenkins-common.sh
The file was modifiedttcn3-cbc-test/jenkins.sh
The file was modifiedttcn3-ggsn-test/jenkins.sh
The file was modifiedttcn3-pcu-test/jenkins.sh
The file was modifiedttcn3-pcu-test/jenkins-sns.sh
The file was modifiedttcn3-gbproxy-test/jenkins.sh
The file was modifiedttcn3-sgsn-test/jenkins.sh
The file was modifiedttcn3-bsc-test/jenkins-sccplite.sh
The file was modifiedttcn3-mgw-test/jenkins.sh
The file was modifiedttcn3-msc-test/jenkins.sh
The file was modifiedttcn3-gbproxy-test-fr/jenkins.sh
The file was modifiedttcn3-bscnat-test/jenkins.sh
The file was modifiedttcn3-bts-test/jenkins.sh
The file was modifiedttcn3-stp-test/jenkins.sh
The file was modifiedttcn3-bsc-test/jenkins.sh
The file was modifiedttcn3-smlc-test/jenkins.sh
The file was modifiedosmo-gsm-tester/jenkins.sh
The file was modifiedttcn3-fr-test/jenkins.sh
The file was modifiedttcn3-sccp-test/jenkins.sh
The file was modifiedttcn3-remsim-test/jenkins.sh
The file was modifiedttcn3-sip-test/jenkins.sh
The file was modifiednplab-sua-test/jenkins.sh
The file was modifiedttcn3-hlr-test/jenkins.sh
The file was modifiedttcn3-nitb-sysinfo/jenkins.sh
The file was modifiednplab-m3ua-test/jenkins.sh
Commit 033c6ab1be7e5ab5883927465cd5313551df5bab by Oliver Smith
*/jenkins.sh: set -e after setting clean up trap

Abort the script and trigger the clean up script, whenever any of the
commands below to prepare the testsuite are failing. This saves time
with figuring out why suddenly all or most tests are failing, and avoids
running the entire testsuite on jenkins if it's obviously not going to
work.

Related: OS#3208
Change-Id: Ie68da2affda8c96b3a515a857a921a05f1bf8ef7
The file was modifiednplab-sua-test/jenkins.sh
The file was modifiedttcn3-bsc-test/jenkins-sccplite.sh
The file was modifiedttcn3-sip-test/jenkins.sh
The file was modifiedttcn3-pcu-test/jenkins.sh
The file was modifiedttcn3-msc-test/jenkins.sh
The file was modifiedttcn3-cbc-test/jenkins.sh
The file was modifiedttcn3-bsc-test/jenkins.sh
The file was modifiedttcn3-mgw-test/jenkins.sh
The file was modifiedttcn3-nitb-sysinfo/jenkins.sh
The file was modifiednplab-m3ua-test/jenkins.sh
The file was modifiedttcn3-fr-test/jenkins.sh
The file was modifiedttcn3-bscnat-test/jenkins.sh
The file was modifiedttcn3-remsim-test/jenkins.sh
The file was modifiedosmo-gsm-tester/jenkins.sh
The file was modifiedttcn3-gbproxy-test-fr/jenkins.sh
The file was modifiedttcn3-sccp-test/jenkins.sh
The file was modifiedttcn3-hlr-test/jenkins.sh
The file was modifiedttcn3-sgsn-test/jenkins.sh
The file was modifiedttcn3-pcu-test/jenkins-sns.sh
The file was modifiedttcn3-smlc-test/jenkins.sh
The file was modifiedttcn3-bts-test/jenkins.sh
The file was modifiedttcn3-ggsn-test/jenkins.sh
The file was modifiedttcn3-gbproxy-test/jenkins.sh
The file was modifiedttcn3-stp-test/jenkins.sh
Commit cf43f686ac942d97f572715e04a617bbbef4df29 by Oliver Smith
jenkins-common: put fix_perms() in clean_up_common

Don't call fix_perms from collect_logs anymore, it looks like it was
only added there to avoid adding it at the end of each jenkins.sh. Now
that we have clean_up_common, put it there.

Related: OS#3208
Change-Id: I6e7e5b35198f420e130b1282eb948b96ccd6c8e0
The file was modifiedjenkins-common.sh
Commit fd6f09e0c2aaa2354a5c4be0ed4a332bbdd9aa5d by Oliver Smith
osmo-ggsn-master: add configure --enable-gtp-linux

Related: OS#3208
Change-Id: I8cf3de4775aa82bfdad1bf2c40aab3b50e910db3
The file was modifiedosmo-ggsn-master/Dockerfile
Commit 79e48fd3ae1279eeaa3373d92d343f2dbfae075e by Oliver Smith
ttcn3-ggsn-test: add kernel test

Make it possible to run ttcn3-ggsn-test against osmo-ggsn with the GTP
kernel module. This feature is enabled by environment variables
explained in ttcn3-ggsn-test/jenkins.sh, and can either use the
pre-built kernel from Debian, or build a kernel from source.

The kernel runs inside QEMU inside the usual osmo-ggsn-master docker
image.

Thanks to Pau for providing the kernel config and kernel-test scripts
that this patch is based on! I ended up modifying them quite a bit to
fit the docker use case, and to build the initrd (so we can use the
stock debian kernel).

Related: OS#3208
Change-Id: I54e752048eed2a170a1cf4e0fd410de255b9de5d
The file was modified.gitignore
The file was addedttcn3-ggsn-test/fragment.config
The file was addedttcn3-ggsn-test/osmo-ggsn-kernel-gtp.cfg
The file was modifiedREADME.md
The file was addedttcn3-ggsn-test/initrd-ggsn.sh
The file was modifiedosmo-ggsn-master/Dockerfile
The file was modifiedjenkins-common.sh
The file was modifiedosmo-ggsn-latest/Dockerfile
The file was addedscripts/kernel-test/initrd-init.sh
The file was addedscripts/kernel-test/kernel-build.sh
The file was addedscripts/kernel-test/prepare.sh
The file was addedscripts/kernel-test/run-qemu.sh
The file was addedscripts/kernel-test/qemu-ifdown.sh
The file was modifiedttcn3-ggsn-test/jenkins.sh
The file was addedscripts/kernel-test/initrd-build.sh
The file was addedscripts/kernel-test/qemu-ifup.sh