Commit Graph

35 Commits

Author SHA1 Message Date
Oliver Smith dd9eafdb0c make: add OSMOCOM_REPO_TESTSUITE_MIRROR
Make it possible to set a different mirror for debian-stretch-titan than
for all other containers. 2021q1 doesn't have the eclipse-titan package
and it doesn't make sense to build it there.

I've thought about adding OSMOCOM_REPO_TESTSUITE_PATH and
OSMOCOM_REPO_TESTSUITE_VERSION too, but we don't have any use for these
right now. Let's add them later if we should need them.

Related: SYS#5370.
Change-Id: I7187473c2188a864b60b03789eff62e0a527404a
2021-05-04 09:30:48 +02:00
Vadim Yanitskiy a8d37628a0 ttcn3-docker-prepare.sh: fix handling of multiple PROJECTs
Change-Id: Ib921d7c5cb2c628f3eca8d5c886375f3288e1dd6
2021-03-16 16:06:04 +01:00
Vadim Yanitskiy ef0f49aa4b Share a single instance of Release.key between all images
This change employs the same approach as [1] for Release.key.

Change-Id: Ic51d6e6557ee0b56d21d8ff4feaf04bc02e41a2e
Related: [1] I3ec86c8610b3b43d39ea8e3da444861d317ced4e
2021-03-10 18:47:03 +01:00
Oliver Smith ce824cc3e1 ttcn3-{fr,gbproxy}-test: use ttcn3-docker-run too
Move the shared pipework script to the base image, and call it in
ttcn3-docker-run.sh if WAIT_FOR_NETDEV is set. Use ttcn3-docker-run.sh
as entrypoint in both Dockerfiles and remove the custom entrypoint
scripts (which are the same as ttcn3-docker-run.sh now).

Related: OS#5017
Change-Id: I2889abe94ed522a205890e5cb39e09cbebfbd820
2021-02-11 15:45:40 +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 9206cf6b28 debian-stretch-titan: prepare: run 'make deps'
Run 'make deps' in ttcn3-docker-prepare.sh, if needed.

Related: OS#5017
Change-Id: I9085203b27d310b63a035fd71f7c2a78d02710d4
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 73d23109b1 debian-stretch-titan: update deps on change
After the initial clone of osmo-ttcn3-hacks and deps, let docker
download deps/Makefile to invalidate the cache if the file changed.

Run "git pull" and "make deps" afterwards, but only if the Makefile is
different. The "if" saves time in the initial build of the image, it
avoids the "git fetch" on every dependency repository during "make deps".

Related: OS#5017
Change-Id: I56673312cfb23375d67900016aaac1931f677275
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
Harald Welte 5bffa66272 debian-stretch-titan: Add wireshark-common for dumpcap
We need dumpcap by ttcn3-dumpcap-start.sh

Change-Id: I0879710ff200bde7f77584dfb69cfb14f02f5d69
2020-12-11 15:26:14 +00:00
Vadim Yanitskiy e1e8d3c592 debian-stretch-titan: use dpkg to install libfftranscode
For some magic reason, apt segfaults while installing the DEBs:

  $ apt install ./libfftranscode0_0.3_${DPKG_ARCH}.deb \
                ./libfftranscode-dev_0.3_${DPKG_ARCH}.deb
  WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
  Reading package lists...
  Segmentation fault (core dumped)

so it kind of confirms the warning about its stability ;)

Change-Id: I7f3288161577b055145afe89de7dff50853760f5
2020-12-10 15:19:22 +00:00
Pau Espin 7d7a06b749 common: Introduce OSMOCOM_REPO_MIRROR param
This allows easily changing to another osmocom repo base URL if the
default one is down.

Related: OS#4862
Change-Id: I8010b08f3dabacfb3c13a44eece6c7a490e0742e
2020-12-02 14:27:02 +01:00
Pau Espin 78ae9377a7 common: Automatize UPSTREAM_DISTRO name based on image name
Similar to what is already done with DISTRO, which points to given image
of ours based on name. This time we do the same with upstream images,
such as debian:stretch or centos:centos8.

This way, for instance calling docker_images_require
"osmo-bsc-latest-centos8" would try to build the
osmo-bsc-latest/Dockerfile file starting from a centos8 image.

Change-Id: I33cb21aa024396974559fd98f9f3c64e2c351eda
2020-12-01 11:46:20 +00:00
Harald Welte 8368c2b973 debian-stretch-titan: Use correct architecture of libfftranscode
We cannot blindly assume that we're running on amd64.

Change-Id: I937d7b02a194244a62b79dbe6b78c27f7baabeb6
Related: OS#4727
2020-11-14 22:54:09 +01:00
Harald Welte ddf61d2453 debian-stretch-titan: use libfftranscode 0.3 (latest version)
Change-Id: Id7e285b170a2f36067a29985c577c3d44d7c7204
Related: OS#4727
2020-11-14 22:47:34 +01:00
Harald Welte 027826fdba introduce 'REGISTRY' argument to all Dockerfiles
This is initialized to docker.io, keeping the default behaviour
if not specified.  However, it allows us to specify a private
registry later on.

Related: OS#4839
Change-Id: I32d4ee6256033c809108c1b86cb6b6c58d880f49
2020-11-02 17:02:26 +01:00
Vadim Yanitskiy 27fb91638d debian-stretch-titan: do not install unneeded dependencies
By default, Debian's package manager (apt) would install as many
dependencies as possible, including optional (recommended and
suggested) ones.

Package 'eclipse-titan' recommends 'default-jdk', which is
absolutely not needed for osmo-ttcn3-hacks, and in its turn
depends on +100500 more packages like xorg, wayland, etc.

This change significantly reduces total amount of dependencies
and the overall build time by disabling installation of
recommended and suggested dependencies.

Change-Id: I56f0d0f37e212b15e8c19ddea96d1c999177eb17
2020-06-05 22:20:35 +07:00
Harald Welte 1bccbb8a66 update OBS Release.key; the old one expired today.
Change-Id: I0dd7d7f54a3eb93ca677f3bdc5e00f62694aaa9e
2020-03-30 18:06:58 +02:00
Pau Espin ae148f1836 debian-stretch-titan: Install netcat-openbsd required by osmo-ttcn3-hacks
Scripts ttcn3-tcpdump-start.sh and ttcn3-tcpdump-stop.sh, run by
osmo-ttcn3-hacks upon start and end of every test in the suite, starts
and stops tcpdump and netcat each time.
netcat is started in order to have a dummy sink for gsmtap log packets,
to get rid of annoying ICMP messages as well as the kernel deciding to
drop those messages (hence not ending up inside the pcap file of
tcpdump) under some circumstances.

Depends: osmo-ttcn3-hacks.git Id69d98db63f8260067ad6bc1525fb05c936912f2
Change-Id: Iccda25bc274ee93705c23dfd3e0f9dad5fc2a059
2019-10-04 15:47:54 +02:00
Alexander Couzens c924d417c5 debian-stretch-titan: install procps
The ttcn3-tcpdump-stop.sh uses `ps` to find out if tcpdump is still
running.

Change-Id: I8db4ad2262a3a734201e39bc065c1c383738992c
2019-05-02 18:04:18 +02:00
Harald Welte a7deb5d7a8 debian-stretch-titan: include libfftranscode for our Iu related tests
Change-Id: Ifd7d682df90f1b17823d8358a8a498f149e4591b
2019-04-21 11:00:45 +00:00
Harald Welte 68875a7529 debian-stretch-titan: Ensure rebuild on changes in repostory
Let's use the well-known hack of adding the "Release" file
of the repository to ensure docker will invalidate the cache if the
repository has changed since the last build.

Change-Id: I54565a4d52221be7e6ded5a339bbf005b58f5998
2018-09-26 10:25:43 +02:00
Neels Hofmeyr a966cdfe4c debian-stretch-titan: add vim
When developing in the actual docker containers, vim is inexpendible.

Change-Id: I964e29c82ab9a1fb2a39845bc45a0d2cead56880
2018-03-19 14:12:43 +01:00
Harald Welte e90ee9602b debian-stretch-titan: Use osmocom build of titan 6.3.x
Debian 9.0 ships with titan 6.1.0 which for some unknown reasons
causes segfaults in the C++ part when parsing CTRL messages and
according to TITAN project is not supported anymore anyway.

So let's use a 6.3.x build, or whatever is the highest version in
the network:osmocom:latest feed instead.
2018-03-16 17:41:44 +01:00
Harald Welte ad4f342b7d bumped to version 0.1.0-df5f204 2018-02-14 19:43:04 +00:00
Harald Welte b7e818d8ab Make sure tcpdump is in debian-stretch-titan
this will enable us to automatically take pcap traces of test runs
2018-02-14 18:04:34 +00:00
Harald Welte 357ec806e1 Move to new TTCN-3 build system/Makefiles
A lof of what the Dockerfiles so far did in terms of cloning library
repositories and calling shell scripts has now been implemented as
part of the Makefiles inside osmo-ttcn3-hacks.git, so we can drop it
here and simply use those.
2017-12-13 10:19:28 +01:00
Harald Welte 0332d0f3a4 debian-stretch-titan: Include many more git repos
Ericsson has released a number of more protocol modules by now,
let's include them.
2017-11-19 00:17:45 +00:00
Harald Welte 3c1dc34c91 apt-get: always use --no-install-recommends and apt-get clean
this helps us to avoid installing unneeded packages and removes the
package cache from the images to keep them less bloated.
2017-08-27 09:53:26 +02:00
Harald Welte 1c57cf6056 bumped to version 0.1.0 2017-08-20 12:03:53 +02:00
Harald Welte 78b42e1e49 fix .release file contents (wrong name / copy+paste error) 2017-08-20 12:00:54 +02:00
Harald Welte 460247905d introduce makefile based build 2017-08-19 19:42:45 +02:00
Harald Welte 64fc38f55d debian-stretch-titan: Include common titan git repo sources 2017-08-18 22:18:32 +02:00
Harald Welte f4e0024abd Add Dockerfile for container with eclipse titan ttcn-3 compiler 2017-05-03 17:03:02 +02:00