Change in docker-playground[master]: *-sgsn-*: 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
Fri May 29 10:38:23 UTC 2020


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


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

*-sgsn-*: support centos8

Related: OS#4564
Change-Id: I8c79ecc154e29a369352621f503fef5a3342ac92
---
M osmo-sgsn-master/Dockerfile
M ttcn3-sgsn-test/Dockerfile
M ttcn3-sgsn-test/jenkins.sh
3 files changed, 56 insertions(+), 25 deletions(-)



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

diff --git a/osmo-sgsn-master/Dockerfile b/osmo-sgsn-master/Dockerfile
index 10fc92e..1a6a7a4 100644
--- a/osmo-sgsn-master/Dockerfile
+++ b/osmo-sgsn-master/Dockerfile
@@ -1,5 +1,9 @@
 ARG	USER
-FROM	$USER/debian-stretch-build
+ARG	DISTRO
+ARG	DOCKER_TAG
+FROM	$USER/$DISTRO-build:$DOCKER_TAG
+# Arguments used after FROM must be specified again
+ARG	DISTRO
 
 MAINTAINER Harald Welte <laforge at gnumonks.org>
 
@@ -7,25 +11,50 @@
 
 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-gsup-client-dev \
-		libosmo-netif-dev \
-		libosmo-ranap-dev \
-		libosmo-sccp-dev \
-		libosmo-sigtran-dev \
-		libsmpp34-dev \
-		libgtp-dev \
-		libasn1c-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-gsup-client-dev \
+			libosmo-netif-dev \
+			libosmo-ranap-dev \
+			libosmo-sccp-dev \
+			libosmo-sigtran-dev \
+			libsmpp34-dev \
+			libgtp-dev \
+			libasn1c-dev && \
+		apt-get clean \
+		;; \
+	centos*) \
+		dnf install -y \
+			telnet \
+			"pkgconfig(libasn1c)" \
+			"pkgconfig(libcrypto)" \
+			"pkgconfig(libgtp)" \
+			"pkgconfig(libosmo-gsup-client)" \
+			"pkgconfig(libosmo-netif)" \
+			"pkgconfig(libosmo-ranap)" \
+			"pkgconfig(libosmo-sigtran)" \
+			"pkgconfig(libosmoabis)" \
+			"pkgconfig(libosmocore)" \
+			"pkgconfig(libosmoctrl)" \
+			"pkgconfig(libosmogb)" \
+			"pkgconfig(libosmogsm)" \
+			"pkgconfig(libosmovty)" \
+			;; \
+	esac
 
 WORKDIR	/tmp
 
diff --git a/ttcn3-sgsn-test/Dockerfile b/ttcn3-sgsn-test/Dockerfile
index fcc2c02..75f61c1 100644
--- a/ttcn3-sgsn-test/Dockerfile
+++ b/ttcn3-sgsn-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-sgsn-test/jenkins.sh b/ttcn3-sgsn-test/jenkins.sh
index 9db295a..336368d 100755
--- a/ttcn3-sgsn-test/jenkins.sh
+++ b/ttcn3-sgsn-test/jenkins.sh
@@ -3,10 +3,10 @@
 . ../jenkins-common.sh
 IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
 docker_images_require \
-	"debian-stretch-build" \
+	"$DISTRO-build" \
 	"osmo-stp-$IMAGE_SUFFIX" \
 	"osmo-sgsn-$IMAGE_SUFFIX" \
-	"debian-stretch-titan" \
+	"$DISTRO-titan" \
 	"ttcn3-sgsn-test"
 
 network_create 172.18.8.0/24
@@ -28,7 +28,7 @@
 		-v $VOL_BASE_DIR/stp:/data \
 		--name ${BUILD_TAG}-stp -d \
 		$DOCKER_ARGS \
-		$REPO_USER/osmo-stp-$IMAGE_SUFFIX
+		$REPO_USER/osmo-stp-$IMAGE_SUFFIX:$DOCKER_TAG
 
 echo Starting container with SGSN
 docker run	--rm \
@@ -36,7 +36,7 @@
 		-v $VOL_BASE_DIR/sgsn:/data \
 		--name ${BUILD_TAG}-sgsn -d \
 		$DOCKER_ARGS \
-		$REPO_USER/osmo-sgsn-$IMAGE_SUFFIX \
+		$REPO_USER/osmo-sgsn-$IMAGE_SUFFIX:$DOCKER_TAG \
 		/bin/sh -c "osmo-sgsn -c /data/osmo-sgsn.cfg >/data/osmo-sgsn.log 2>&1"
 
 echo Starting container with SGSN testsuite
@@ -46,7 +46,7 @@
 		-v $VOL_BASE_DIR/sgsn-tester:/data \
 		--name ${BUILD_TAG}-ttcn3-sgsn-test \
 		$DOCKER_ARGS \
-		$REPO_USER/ttcn3-sgsn-test $@
+		$REPO_USER/ttcn3-sgsn-test:$DOCKER_TAG $@
 
 echo Starting container to merge logs
 docker run	--rm \
@@ -56,7 +56,7 @@
 		--name ${BUILD_TAG}-ttcn3-sgsn-test-logmerge \
 		--entrypoint /osmo-ttcn3-hacks/log_merge.sh SGSN_Tests --rm \
 		$DOCKER_ARGS \
-		$REPO_USER/ttcn3-sgsn-test
+		$REPO_USER/ttcn3-sgsn-test:$DOCKER_TAG
 
 echo Stopping containers
 docker container kill ${BUILD_TAG}-sgsn

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I8c79ecc154e29a369352621f503fef5a3342ac92
Gerrit-Change-Number: 18573
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/20200529/e2447736/attachment.htm>


More information about the gerrit-log mailing list