diff options
author | Harald Welte <laforge@gnumonks.org> | 2019-02-20 21:50:56 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2019-02-20 21:45:07 +0000 |
commit | eedbb5655244147fb5e327196bf44019462a83b9 (patch) | |
tree | 294c697fd14002fd1c023d02e01bbb8239683d83 /ttcn3-pcu-test/jenkins.sh | |
parent | 0b3587fae8448f21425fac1a6c098f9102d3dbde (diff) |
PCU: Add osmo-pcu-* + ttcn3-pcu-test containers
This will enable us to run the PCU testsuite automatically by
jenkins, just like for other Osmocom projects.
Change-Id: Ia8e2ed2e7d03b8afdc7b1e068f94b0544a8112c7
Related: OS#2890
Diffstat (limited to 'ttcn3-pcu-test/jenkins.sh')
-rwxr-xr-x | ttcn3-pcu-test/jenkins.sh | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/ttcn3-pcu-test/jenkins.sh b/ttcn3-pcu-test/jenkins.sh new file mode 100755 index 0000000..bee539d --- /dev/null +++ b/ttcn3-pcu-test/jenkins.sh @@ -0,0 +1,46 @@ +#!/bin/sh + +. ../jenkins-common.sh +IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}" +docker_images_require \ + "debian-jessie-build" \ + "osmo-pcu-$IMAGE_SUFFIX" \ + "debian-stretch-titan" \ + "ttcn3-pcu-test" + +network_create 172.18.13.0/24 + +mkdir $VOL_BASE_DIR/pcu-tester +mkdir $VOL_BASE_DIR/pcu-tester/unix +cp PCU_Tests.cfg $VOL_BASE_DIR/pcu-tester/ + +mkdir $VOL_BASE_DIR/pcu +mkdir $VOL_BASE_DIR/pcu/unix +cp osmo-pcu.cfg $VOL_BASE_DIR/pcu/ + +mkdir $VOL_BASE_DIR/unix + +echo Starting container with PCU +docker run --rm \ + --network $NET_NAME --ip 172.18.13.101 \ + -v $VOL_BASE_DIR/pcu:/data \ + -v $VOL_BASE_DIR/unix:/data/unix \ + --name ${BUILD_TAG}-pcu -d \ + $REPO_USER/osmo-pcu-$IMAGE_SUFFIX \ + /usr/local/bin/respawn.sh osmo-pcu -c /data/osmo-pcu.cfg + +echo Starting container with PCU testsuite +docker run --rm \ + --network $NET_NAME --ip 172.18.13.10 \ + -e "TTCN3_PCAP_PATH=/data" \ + -v $VOL_BASE_DIR/pcu-tester:/data \ + -v $VOL_BASE_DIR/unix:/data/unix \ + --name ${BUILD_TAG}-ttcn3-pcu-test \ + $REPO_USER/ttcn3-pcu-test + +echo Stopping containers +docker container kill ${BUILD_TAG}-pcu + +network_remove +rm -rf $VOL_BASE_DIR/unix +collect_logs |