From 01aed78319529667720aa76573bc93fa2d5f7570 Mon Sep 17 00:00:00 2001 From: garciay Date: Mon, 27 Apr 2020 20:05:10 +0200 Subject: [PATCH] Bug fixed in scripts/update_mec_project.bash --- docker/Dockerfile | 17 ++++++++++------- docker/build.sh | 4 ++-- docker/home/etc/init.d/40-lewis.sh | 6 +++--- docker/home/etc/init.d/50-stf569.sh | 1 + scripts/update_mec_project.bash | 5 ++--- 5 files changed, 18 insertions(+), 15 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index b2347db..57678aa 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,21 +1,24 @@ FROM stfubuntu:18.04 -MAINTAINER ETSI TTF T0002 +MAINTAINER ETSI TTF STF569 -LABEL description="TTF0002 Docker Image" +LABEL description="STF569_Mec Docker Image" ENV TERM=linux \ HOME=/home/etsi \ - HOSTNAME=docker-titan-TTF0002 - -USER etsi + HOSTNAME=docker-titan-STF569 COPY home /home/etsi +RUN cd /home/etsi \ + && chown -R etsi:etsi . \ + && ls ./etc/init.d/*.sh | while read S; do chmod 0750 "$S" || exit 1; done + +USER etsi + RUN cd ${HOME} \ - sudo chown -R etsi:etsi ${HOME} \ && export PATH=$HOME/bin:$PATH \ - && ls ${HOME}/etc/init.d/*.sh | while read S; do chmod 0750 "$S"; /bin/bash -c "$S" || exit 1; done + && ls ${HOME}/etc/init.d/*.sh | while read S; do /bin/bash -c "$S" || exit 1; done CMD ["/bin/bash"] diff --git a/docker/build.sh b/docker/build.sh index cd64dbe..5b699e6 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -7,10 +7,10 @@ set -vx #check and build stfubuntu image if [ -z `docker images -q stfubuntu` ]; then - docker build --tag stfubuntu:18.04 -f Dockerfile.stfubuntu --force-rm . || exit 1 + docker build --no-cache --tag stfubuntu:18.04 -f Dockerfile.stfubuntu --force-rm . || exit 1 fi -docker build --tag stf569_mec --force-rm . || ( echo "Docker build failed: $?"; exit 1 ) +docker build --no-cache --tag stf569_mec --force-rm . || ( echo "Docker build failed: $?"; exit 1 ) docker images docker inspect stf569_mec:latest || ( echo "Docker inspect failed: $?"; exit 1 ) diff --git a/docker/home/etc/init.d/40-lewis.sh b/docker/home/etc/init.d/40-lewis.sh index 53e828d..986c58d 100755 --- a/docker/home/etc/init.d/40-lewis.sh +++ b/docker/home/etc/init.d/40-lewis.sh @@ -4,9 +4,9 @@ set -vx echo -e "*****************************\n* Install osip\n*****************************\n" -cd ${HOME}/frameworks -git clone https://github.com/fsismondi/ioppytest-utils ./ioppytest-utils -cd ./ioppytest-utils +cd ${HOME}/dev +git clone https://forge.etsi.org/rep/plugtests/nfv/ttcn-3-lewis-testing-tools.git ttcn-3-lewis-testing-tools +cd ./ttcn-3-lewis-testing-tools pip3 install -r ./requirements.txt cd ${HOME} diff --git a/docker/home/etc/init.d/50-stf569.sh b/docker/home/etc/init.d/50-stf569.sh index ce7ef94..5b0c0fd 100755 --- a/docker/home/etc/init.d/50-stf569.sh +++ b/docker/home/etc/init.d/50-stf569.sh @@ -8,6 +8,7 @@ cd /home/etsi/dev/STF569_Mec/ttcn git clone https://forge.etsi.org/gitlab/LIBS/LibCommon.git ./LibCommon git clone -bTTF0002 https://forge.etsi.org/gitlab/LIBS/LibIts ./LibIts cd /home/etsi/dev/STF569_Mec/ttcn/LibIts +git checkout TTF0002 rm -fr asn1 t3q xsd cd ttcn && rm -fr BTP CAM Common DENM GeoNetworking Ipv6OverGeoNetworking IVIM MapemSpatem Pki Security SremSsem cd /home/etsi/dev/STF569_Mec/scripts diff --git a/scripts/update_mec_project.bash b/scripts/update_mec_project.bash index e0178c0..a4f73b7 100755 --- a/scripts/update_mec_project.bash +++ b/scripts/update_mec_project.bash @@ -14,16 +14,15 @@ RUN_PATH="${0%/*}" if [ "${VALIDATION_DIR}" == "" ] then - VALIDATION_DIR=${VALIDATION_DIR} + VALIDATION_DIR=${HOME} fi -USER=`whoami` CHOWN_USER_GROUP=${USER}:${USER} SRC_MEC_PATH=${VALIDATION_DIR}/dev/STF569_Mec if [ "${PATH_DEV_MEC}" == "" ] then - PATH_DEV_MEC=${VALIDATION_DIR}/dev/etsi_mec + PATH_DEV_MEC=`pwd`/../etsi_mec fi echo ${PATH_DEV_MEC} -- GitLab