Commit Graph

10 Commits

Author SHA1 Message Date
Oliver Smith 033c6ab1be */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
2021-02-26 09:32:34 +01:00
Oliver Smith 12b961942a 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
2021-02-26 09:32:06 +01:00
Oliver Smith 6f6724178b ttcn3: use REGISTRY arg with debian-stretch-titan
Allow jenkins to fetch the image from our private docker registry.
Outside of jenkins, the image is built locally just like before.

Related: OS#5017
Change-Id: I46cc176ea09d8badc359b627d7ce2f459211258c
2021-02-11 16:27:23 +01:00
Oliver Smith 2b38b8e779 ttcn3: move shared run code to script
While I'm at it with tidying up the Dockerfiles, create a
ttcn3-docker-run.sh with shared run code.

Related: OS#5017
Change-Id: Id90769707158f0488eca2313c57b99ea7a4a27c8
2021-02-11 15:45:40 +01:00
Oliver Smith 914a486ef1 debian-stretch-titan: prepare: start/stop links
Create symlinks to ttcn3-*-start.sh and ttcn3-*-stop.sh in the
prepare.sh script instead of in each of the ttcn3 Dockerfiles.

Related: OS#5017
Change-Id: I634cf71cff7936efe6e0461d21dc1119de922ada
2021-02-11 15:45:40 +01:00
Oliver Smith 892d910444 ttcn3: move prepare code to shared script
Move the git fetch/checkout code and make call to build the testsuite,
to debian-stretch-titan/ttcn3-docker-prepare.sh. In the next patch, I
will extend the script to update deps right before building too (e.g.
because OSMO_TTCN3_BRANCH changed).

Related: OS#5017
Change-Id: I4b5bedf058dc527e821f9b7204c632820e671af9
2021-02-11 15:45:40 +01:00
Oliver Smith 61fed0ad39 ttcn3: move initial clone to debian-stretch-titan
Clone the osmo-ttcn3-hacks and all dependency repositories less often by
moving related commands to the shared debian-stretch-titan image.

Remove the 'git checkout -f -B master origin/master' line, because the
master branch is checked out by default.

While at it, move the shared "git config" commands too, and move them
before cloning the repositories, so they don't run again whenever the
deps change (logic to invalidate the cache if deps change will be added
in the next patch).

Related: OS#5017
Change-Id: I2bb142dce061eba4b6a828c4e435510e309989fd
2021-02-11 15:45:40 +01:00
Oliver Smith db3f98113c ttcn3: remove /root/projects/git symlink
Remove leftover from old TTCN-3 build scripts, before refactoring ttcn3
Dockerfiles. This line has already been removed in 357ec806 from 2017 for
ggsn-test.

In osmo-ttcn3-hacks.git, this is only referenced in the obsolete
bin/install.script (looks like we could remove that, together with the
rest of the bin dir?).

Related: OS#5017
Change-Id: Id23e7fae58ba246916a38aa0a10035d4f67f7588
2021-02-11 15:45:40 +01:00
Neels Hofmeyr 6c61185db4 fix ttcn3-smlc-test/Dockerfile
Change-Id: I6a53b3f398d807233a53cad61ae61b5f0c89b971
2020-10-21 00:46:10 +02:00
Neels Hofmeyr 71b3157420 add ttcn3-smlc-test
Change-Id: I6ab09224a41796fed4023ba1ef1ff99f37863875
2020-10-15 04:09:33 +00:00