diff --git a/osmo-epdg-master/Dockerfile b/osmo-epdg-master/Dockerfile index a5e9b142..cdef31ea 100644 --- a/osmo-epdg-master/Dockerfile +++ b/osmo-epdg-master/Dockerfile @@ -4,6 +4,14 @@ FROM $USER/$DISTRO-erlang # Arguments used after FROM must be specified again ARG DISTRO +# $distro-erlang switched to user build, but we need to install more stuff beforehand: +USER root +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + iproute2 && \ + apt-get clean +USER build + WORKDIR /tmp ARG OSMO_EPDG_BRANCH="master" diff --git a/ttcn3-epdg-test/epdg.sh b/ttcn3-epdg-test/epdg.sh new file mode 100755 index 00000000..fcecbf95 --- /dev/null +++ b/ttcn3-epdg-test/epdg.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set +e +set -x + +ip addr add 192.168.0.2 dev eth0 +ERL_FLAGS='-config /data/osmo-epdg.config' /tmp/osmo-epdg/_build/default/bin/osmo-epdg diff --git a/ttcn3-epdg-test/jenkins.sh b/ttcn3-epdg-test/jenkins.sh index a4d029bb..39793fe7 100755 --- a/ttcn3-epdg-test/jenkins.sh +++ b/ttcn3-epdg-test/jenkins.sh @@ -15,6 +15,7 @@ write_mp_osmo_repo "$VOL_BASE_DIR/epdg-tester/EPDG_Tests.cfg" mkdir $VOL_BASE_DIR/epdg cp osmo-epdg.config $VOL_BASE_DIR/epdg/ +cp epdg.sh $VOL_BASE_DIR/epdg/ network_create network_replace_subnet_in_configs @@ -32,7 +33,8 @@ docker run --rm \ -v $VOL_BASE_DIR/epdg:/data \ --name ${BUILD_TAG}-epdg -d \ $DOCKER_ARGS \ - $REPO_USER/osmo-epdg-$IMAGE_SUFFIX + $REPO_USER/osmo-epdg-$IMAGE_SUFFIX \ + /bin/sh -c "/data/epdg.sh >/data/osmo-epdg.log 2>&1" # Give some time to osmo-epdg to be fully started; it's a bit slow... sleep 2