Change in docker-playground[master]: ttcn3-bts-test/jenkins.sh: Move start of containers into shell functions

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed May 29 20:02:59 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14269 )

Change subject: ttcn3-bts-test/jenkins.sh: Move start of containers into shell functions
......................................................................

ttcn3-bts-test/jenkins.sh: Move start of containers into shell functions

Change-Id: If9ac580aa5f0745468f69d413aa732891acb4a1c
---
M ttcn3-bts-test/jenkins.sh
1 file changed, 61 insertions(+), 46 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/ttcn3-bts-test/jenkins.sh b/ttcn3-bts-test/jenkins.sh
index eb96e59..20f9373 100755
--- a/ttcn3-bts-test/jenkins.sh
+++ b/ttcn3-bts-test/jenkins.sh
@@ -11,6 +11,62 @@
 	"debian-stretch-titan" \
 	"ttcn3-bts-test"
 
+start_bsc() {
+	echo Starting container with BSC
+	docker run	--rm \
+			--network $NET_NAME --ip 172.18.9.11 \
+			-v $VOL_BASE_DIR/bsc:/data \
+			--name ${BUILD_TAG}-bsc -d \
+			$REPO_USER/osmo-bsc-$IMAGE_SUFFIX \
+			osmo-bsc -c /data/osmo-bsc.cfg
+}
+
+start_bts() {
+	echo Starting container with BTS
+	docker run	--rm \
+			--network $NET_NAME --ip 172.18.9.20 \
+			-v $VOL_BASE_DIR/bts:/data \
+			-v $VOL_BASE_DIR/unix:/data/unix \
+			--name ${BUILD_TAG}-bts -d \
+			$REPO_USER/osmo-bts-$IMAGE_SUFFIX \
+			/usr/local/bin/respawn.sh osmo-bts-trx -c /data/osmo-bts.cfg -i 172.18.9.10
+}
+
+start_fake_trx() {
+	echo Starting container with fake_trx
+	docker run	--rm \
+			--network $NET_NAME --ip 172.18.9.21 \
+			-v $VOL_BASE_DIR/fake_trx:/data \
+			--name ${BUILD_TAG}-fake_trx -d \
+			$REPO_USER/osmocom-bb-host-master \
+			/tmp/osmocom-bb/src/target/trx_toolkit/fake_trx.py \
+				--log-file-name /data/fake_trx.log \
+				--log-file-level DEBUG \
+				--log-level INFO \
+				-R 172.18.9.20 -r 172.18.9.22
+}
+
+start_trxcon() {
+	echo Starting container with trxcon
+	docker run	--rm \
+			--network $NET_NAME --ip 172.18.9.22 \
+			-v $VOL_BASE_DIR/unix:/data/unix \
+			--name ${BUILD_TAG}-trxcon -d \
+			$REPO_USER/osmocom-bb-host-master \
+			trxcon -i 172.18.9.21 -s /data/unix/osmocom_l2
+}
+
+start_testsuite() {
+	echo Starting container with BTS testsuite
+	docker run	--rm \
+			--network $NET_NAME --ip 172.18.9.10 \
+			-e "TTCN3_PCAP_PATH=/data" \
+			-v $VOL_BASE_DIR/bts-tester:/data \
+			-v $VOL_BASE_DIR/unix:/data/unix \
+			--name ${BUILD_TAG}-ttcn3-bts-test \
+			$REPO_USER/ttcn3-bts-test
+}
+
 network_create 172.18.9.0/24
 
 mkdir $VOL_BASE_DIR/bts-tester
@@ -28,52 +84,11 @@
 
 mkdir $VOL_BASE_DIR/fake_trx
 
-echo Starting container with BSC
-docker run	--rm \
-		--network $NET_NAME --ip 172.18.9.11 \
-		-v $VOL_BASE_DIR/bsc:/data \
-		--name ${BUILD_TAG}-bsc -d \
-		$REPO_USER/osmo-bsc-$IMAGE_SUFFIX \
-		osmo-bsc -c /data/osmo-bsc.cfg
-
-echo Starting container with BTS
-docker run	--rm \
-		--network $NET_NAME --ip 172.18.9.20 \
-		-v $VOL_BASE_DIR/bts:/data \
-		-v $VOL_BASE_DIR/unix:/data/unix \
-		--name ${BUILD_TAG}-bts -d \
-		$REPO_USER/osmo-bts-$IMAGE_SUFFIX \
-		/usr/local/bin/respawn.sh osmo-bts-trx -c /data/osmo-bts.cfg -i 172.18.9.10
-
-echo Starting container with fake_trx
-docker run	--rm \
-		--network $NET_NAME --ip 172.18.9.21 \
-		-v $VOL_BASE_DIR/fake_trx:/data \
-		--name ${BUILD_TAG}-fake_trx -d \
-		$REPO_USER/osmocom-bb-host-master \
-		/tmp/osmocom-bb/src/target/trx_toolkit/fake_trx.py \
-			--log-file-name /data/fake_trx.log \
-			--log-file-level DEBUG \
-			--log-level INFO \
-			-R 172.18.9.20 -r 172.18.9.22
-
-echo Starting container with trxcon
-docker run	--rm \
-		--network $NET_NAME --ip 172.18.9.22 \
-		-v $VOL_BASE_DIR/unix:/data/unix \
-		--name ${BUILD_TAG}-trxcon -d \
-		$REPO_USER/osmocom-bb-host-master \
-		trxcon -i 172.18.9.21 -s /data/unix/osmocom_l2
-
-
-echo Starting container with BTS testsuite
-docker run	--rm \
-		--network $NET_NAME --ip 172.18.9.10 \
-		-e "TTCN3_PCAP_PATH=/data" \
-		-v $VOL_BASE_DIR/bts-tester:/data \
-		-v $VOL_BASE_DIR/unix:/data/unix \
-		--name ${BUILD_TAG}-ttcn3-bts-test \
-		$REPO_USER/ttcn3-bts-test
+start_bsc
+start_bts
+start_fake_trx
+start_trxcon
+start_testsuite
 
 echo Stopping containers
 docker container kill ${BUILD_TAG}-trxcon

-- 
To view, visit https://gerrit.osmocom.org/14269
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If9ac580aa5f0745468f69d413aa732891acb4a1c
Gerrit-Change-Number: 14269
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190529/cd4860cd/attachment.html>


More information about the gerrit-log mailing list