Change in docker-playground[master]: *-mgw-*: support centos8

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

osmith gerrit-no-reply at lists.osmocom.org
Thu May 28 15:21:54 UTC 2020


osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/18554 )


Change subject: *-mgw-*: support centos8
......................................................................

*-mgw-*: support centos8

Use osmo-mgw as example of how a testsuite will work with both
debian-stretch and centos8. I will add patches for all other containers
tomorrow.

Related: OS#4564
Change-Id: I6579748056ce0505304378b342a698b98c77fd18
---
M osmo-mgw-master/Dockerfile
M ttcn3-mgw-test/Dockerfile
M ttcn3-mgw-test/jenkins.sh
3 files changed, 40 insertions(+), 17 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/54/18554/1

diff --git a/osmo-mgw-master/Dockerfile b/osmo-mgw-master/Dockerfile
index f898c7e..8d996e3 100644
--- a/osmo-mgw-master/Dockerfile
+++ b/osmo-mgw-master/Dockerfile
@@ -1,5 +1,8 @@
 ARG	USER
-FROM	$USER/debian-stretch-build
+ARG	DISTRO
+ARG	DOCKER_TAG
+FROM	$USER/$DISTRO-build:$DOCKER_TAG
+ARG	DISTRO
 
 MAINTAINER Harald Welte <laforge at gnumonks.org>
 
@@ -7,19 +10,37 @@
 
 COPY	Release.key /tmp/Release.key
 
-RUN	apt-key add /tmp/Release.key && \
-	rm /tmp/Release.key && \
-	echo "deb " $OSMOCOM_REPO " ./" > /etc/apt/sources.list.d/osmocom-nightly.list
+RUN	case "$DISTRO" in \
+	debian*) \
+		apt-key add /tmp/Release.key && \
+		rm /tmp/Release.key && \
+		echo "deb " $OSMOCOM_REPO " ./" > /etc/apt/sources.list.d/osmocom-nightly.list; \
+		;; \
+	esac
 
 ADD	$OSMOCOM_REPO/Release /tmp/Release
-RUN	apt-get update && \
-	apt-get install -y --no-install-recommends \
-		telnet \
-		libosmocore-dev \
-		libosmo-abis-dev \
-		libosmo-netif-dev \
-		libosmo-sccp-dev && \
-	apt-get clean
+RUN	case "$DISTRO" in \
+	debian*) \
+		apt-get update && \
+		apt-get install -y --no-install-recommends \
+			telnet \
+			libosmocore-dev \
+			libosmo-abis-dev \
+			libosmo-netif-dev \
+			libosmo-sccp-dev && \
+		apt-get clean \
+		;; \
+	centos*) \
+		dnf install -y \
+			telnet \
+			"pkgconfig(libosmo-netif)" \
+			"pkgconfig(libosmocore)" \
+			"pkgconfig(libosmoctrl)" \
+			"pkgconfig(libosmogsm)" \
+			"pkgconfig(libosmovty)" \
+			"pkgconfig(libosmocoding)" \
+		;; \
+	esac
 
 WORKDIR	/tmp
 
diff --git a/ttcn3-mgw-test/Dockerfile b/ttcn3-mgw-test/Dockerfile
index 33183d0..1463397 100644
--- a/ttcn3-mgw-test/Dockerfile
+++ b/ttcn3-mgw-test/Dockerfile
@@ -1,5 +1,7 @@
 ARG	USER
-FROM	$USER/debian-stretch-titan
+ARG	DISTRO
+ARG	DOCKER_TAG
+FROM	$USER/$DISTRO-titan:$DOCKER_TAG
 
 RUN	mkdir /root/projects && (cd /root/projects && ln -sf / git)
 RUN	git clone git://git.osmocom.org/osmo-ttcn3-hacks.git
diff --git a/ttcn3-mgw-test/jenkins.sh b/ttcn3-mgw-test/jenkins.sh
index 4ebd235..46c4ab9 100755
--- a/ttcn3-mgw-test/jenkins.sh
+++ b/ttcn3-mgw-test/jenkins.sh
@@ -3,9 +3,9 @@
 . ../jenkins-common.sh
 IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
 docker_images_require \
-	"debian-stretch-build" \
+	"$DISTRO-build" \
 	"osmo-mgw-$IMAGE_SUFFIX" \
-	"debian-stretch-titan" \
+	"$DISTRO-titan" \
 	"ttcn3-mgw-test"
 
 mkdir $VOL_BASE_DIR/mgw-tester
@@ -22,7 +22,7 @@
 		-v $VOL_BASE_DIR/mgw:/data \
 		--name ${BUILD_TAG}-mgw -d \
 		$DOCKER_ARGS \
-		$REPO_USER/osmo-mgw-$IMAGE_SUFFIX
+		$REPO_USER/osmo-mgw-$IMAGE_SUFFIX:$DOCKER_TAG
 
 # start docker container with testsuite in foreground
 docker run	--rm \
@@ -31,7 +31,7 @@
 		-e "TTCN3_PCAP_PATH=/data" \
 		--name ${BUILD_TAG}-ttcn3-mgw-test \
 		$DOCKER_ARGS \
-		$REPO_USER/ttcn3-mgw-test
+		$REPO_USER/ttcn3-mgw-test:$DOCKER_TAG
 
 # stop mgw after test has completed
 docker container stop ${BUILD_TAG}-mgw

-- 
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/18554
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I6579748056ce0505304378b342a698b98c77fd18
Gerrit-Change-Number: 18554
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200528/200946b1/attachment.htm>


More information about the gerrit-log mailing list