Commit Graph

12 Commits

Author SHA1 Message Date
Oliver Smith 910dacf686 make: add OSMOCOM_REPO_PATH
Allow to change the path between OSMOCOM_REPO_MIRROR and
OSMOCOM_REPO_VERSION. While at it, tweak related comments (comment above
the variable as usually, replace "repo" wording with "feed" for the
latest/nightly variable as we usually refer to it as feed), and mention
OSMOCOM_REPO_* in README.md.

In order to be able to use a different mirror for testsuite and systems
under test, the testsuite related Dockerfiles (osmocom-bb-host-master,
debian-stretch-titan) are not using OSMOCOM_REPO_PATH. We could add a
OSMOCOM_REPO_TESTSUITE_PATH on demand, as mentioned in the next commit.

Related: SYS#5370
Change-Id: I8010a4d49d4620a5c47c2ff4f909a9aeeaad7b73
2021-05-04 09:30:48 +02:00
Oliver Smith 84255c7bb8 centos8: don't download .repo file
Generate the .repo file on the fly instead of downloading it from the
OBS repository. Ensure the gpgkey gets downloaded via HTTPS. I'm about
to use centos8-obs-latest with an alternative repository, which does not
have the .repo file. Adjust other containers for consistency.

Related: SYS#5370
Related: https://download.opensuse.org/repositories/network:/osmocom:/latest/CentOS_8/network:osmocom:latest.repo
Related: https://download.opensuse.org/repositories/network:/osmocom:/nightly/CentOS_8/network:osmocom:nightly.repo
Change-Id: Ic9ffa79cfe5a74bdc59d5ddd505a9af7be574bf9
2021-05-04 09:30:48 +02:00
Oliver Smith ce8da526b0 centos8-build: use nightly URL to invalidate cache
Fix copy paste mistake.

Change-Id: I1c5cfe782207af2a2e505fa30e77b9ea9fd143c5
2021-05-04 09:30:48 +02:00
Vadim Yanitskiy 085656ac45 Make respawn.sh a common part of *-build/-obs images
Maintaining several versions of the same file in different folders
is a bad idea, because at some point their content gets out of sync.
This is exactly what happened to 'respawn.sh': sleep()ing was only
implemented in 'osmo-bts-master/respawn.sh', other versions of this
file would simply ignore '$SLEEP_BEFORE_RESPAWN'.

The easiest solution would be to have all common files in a single
directory, however Docker does not allow to ADD files from outside
of the build context.  In other words, all files must be in the
same directory as the Dockerfile itself.

Modify 'make/Makefile' in order to copy the contents of common
directory to the current build context ('pre-build' target) and
remove it after building ('post-build' target).

Change-Id: I3ec86c8610b3b43d39ea8e3da444861d317ced4e
2021-03-10 18:46:29 +01:00
Oliver Smith 31daedcd2b osmo-*-master: move common code to *-build
Move common code from osmo-*-master to debian-stretch-build and
centos8-build:
* add the OBS repository key (debian only)
* add the OBS repository with "nightly" feed (debian only, already done
  for centos8)
* install telnet
* invalidate the cache once the repository is updated

While at it, remove deprecated MAINTAINER lines.

This fixes the need to read both the repository index of debian-stretch
and centos8 and having to invalidate the cache if either of them changes
(instead of reading just the relevant index and invalidating the cache
only if the relevant one changes).

A similar change was done with osmo-*-latest in
I443d52eba416ea298cc5421e280ad2f4ca59283b.

Related: OS#5049
Related: https://docs.docker.com/engine/reference/builder/#maintainer-deprecated
Change-Id: Id69f3eaf37f823bac0947366f27a25edd277a4cb
2021-03-04 14:45:51 +01:00
Harald Welte 37f3d4594b centos8-build: Make 'make' work again
Change-Id: I695ff7d6db7026a3b91771d4964f23d3151ef0aa
2020-12-16 10:54:37 +01:00
Harald Welte de52a89d0d migrate from CentOS_8_Stream to CentOS_8
Change-Id: I72c8fdae14816ec0a243f3fca4b4c2a49b562845
Related: SYS#5250
2020-12-16 10:54:37 +01:00
Pau Espin Pedrol ffd76f2060 centos8-build: Use arg OSMOCOM_REPO_MIRROR
Change-Id: If2aefff04792fe4d215fcc52377bec64d9a1db2d
2020-12-09 16:36:17 +00:00
Harald Welte ec62979d51 centos8-build: Upstream requires 'powertools' not 'PowerTools'
I just confirmed: With a centos:centos8 base image of a few weeks ago,
"PowerTools" works. With the current docker base image for
centos:centos8, only lowercase "powertools" works, uppercase is no
longer accepted.

https://access.redhat.com/discussions/5417621
https://www.reddit.com/r/CentOS/comments/jd7x3d/how_to_enable_powertools_in_centos_stream/
https://git.centos.org/rpms/centos-repos/blob/c8/f/SOURCES/CentOS-Stream-PowerTools.repo#_11

Change-Id: I518d5523688a7439f76684ee38bf743a4e78c9fd
Closes: SYS#5244
2020-12-09 11:05:27 +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 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
Oliver Smith c4298de73c centos8-build: new image
Create centos8-build similar to debian-stretch-build, as preparation for
ttcn-3 tests on centos 8.

Related: OS#4564
Change-Id: Ide1e88c92b7ac301f0ea8ca110c1b2eb43f9d5ad
2020-05-30 08:57:58 +02:00