Loading switch_its_r1.sh 0 → 100755 +54 −0 Original line number Diff line number Diff line #!/bin/bash #set -e set -vx BASE_PATH=`pwd` git checkout devel git submodule update --init --recursive --remote cd $BASE_PATH/ttcn git checkout devel for i in `find $BASE_PATH/ttcn -type d -name "Ats*"` do cd $i git checkout devel done for i in `find $BASE_PATH/ttcn/Ats* -type d -name "asn1"` do cd $i git checkout testing SUB_DIRS=`find . -type d` if [ "SUB_DIRS" != "" ] then for j in $SUB_DIRS do cd $j git checkout testing cd - done fi done cd $BASE_PATH if [ ! -f ./titan-test-system-framework ] then git clone --recurse-submodules --single-branch --branch devel https://labs.etsi.org/rep/cti-tools/titan-test-system-framework.git cd ./titan-test-system-framework else cd ./titan-test-system-framework git checkout devel fi cd ./ttcn/LibHttp ln -sf module_its.mk module.mk cd $BASE_PATH/ttcn/LibIts git checkout devel cd $BASE_PATH cp ./ttcn/patch_lib_common_titan/module.mk ./ttcn/LibCommon/ cp ./ttcn/patch_lib_common_titan/ttcn/* ./ttcn/LibCommon/ttcn exit 0 virtualization/docker/Dockerfile +7 −6 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ FROM alpine:3.16 # Install dependencies RUN apk update && \ apk add --no-cache autoconf automake sudo make git g++ diffutils expect openssl-dev libxml2-dev libxml2-utils libxslt-dev libtool ncurses-dev jsoncpp-dev readline-dev flex bison perl libexecinfo-dev bash libedit libedit-dev lksctp-tools lksctp-tools-dev libpcap-dev apk add --no-cache autoconf automake sudo make git g++ diffutils expect openssl-dev libxml2-dev libxml2-utils libxslt-dev libtool ncurses-dev jsoncpp-dev readline-dev flex bison perl libexecinfo-dev bash libedit libedit-dev lksctp-tools lksctp-tools-dev libpcap-dev curl # Create user and sudouser RUN \ Loading @@ -22,15 +22,16 @@ WORKDIR /home/etsi RUN \ mkdir -p frameworks dev tmp \ && cd frameworks \ && git clone --branch=vlm_test https://github.com/fillabs/asn1c.git ./asn1c \ && cd ./asn1c \ && git clone --branch=vlm_test https://github.com/fillabs/asn1c.git ./asn1c.denis \ && cd ./asn1c.denis \ && autoreconf -iv && ./configure --prefix=${HOME} && make install \ && cd - \ && mkdir -p titan && cd ./titan \ && git clone https://github.com/eclipse/titan.core.git || exit 1 WORKDIR /home/etsi/frameworks/titan.core/ WORKDIR /home/etsi/frameworks/titan/titan.core/ # Setup ENV variables ENV TTCN3_DIR=/home/etsi/frameworks/titan.core/Install ENV TTCN3_DIR=/home/etsi/frameworks/titan/titan.core/Install ENV PATH=$TTCN3_DIR/bin:$PATH \ LD_LIBRARY_PATH=$TTCN3_DIR/lib:$LD_LIBRARY_PATH Loading @@ -51,6 +52,6 @@ WORKDIR /home/etsi/dev EXPOSE 80/tcp 443/tcp 12340-12349/udp ENTRYPOINT ["/home/etsi/dev/cise/virtualization/docker/docker-entrypoint.sh"] ENTRYPOINT ["/home/etsi/dev/TS.ITS/virtualization/docker/docker-entrypoint.sh"] CMD ["help"] No newline at end of file virtualization/docker/docker-entrypoint.sh +10 −1 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ usage() { done } commands="help,build,clean,list,modulepar,rebuild,run,version" commands="help,build,clean,ip,list,modulepar,ping,rebuild,build-run,run,version" if [ $# == 0 ]; then usage Loading @@ -33,15 +33,24 @@ case "$1" in clean) cd ${GEN_DIR} && make clean ;; ip) ip address ;; list) ${cli} -l ;; modulepar) ${cli} -p ;; ping) sudo ping $2 ;; rebuild) cd ${GEN_DIR} && rm -fr ./bin ./build ; make ;; build-run) d ${GEN_DIR}/scripts && ./run_all.bash 0 ;; run) cd ${GEN_DIR}/scripts && ./run_all.bash ;; Loading virtualization/docker/docker-run.sh +5 −4 Original line number Diff line number Diff line #!/bin/bash set -exo pipefail set +vx cd "$(dirname ${BASH_SOURCE})" docker run --rm -it \ -w $HOME/dev/TS.ITS \ -e GEN_DIR=$HOME/dev/TS.ITS \ -w $HOME/dev/TS.ITS_r1 \ -e GEN_DIR=$HOME/dev/TS.ITS_r1 \ -u "$(id -u):$(id -g)" \ -v "${PWD}/../..:$HOME/dev/TS.ITS" \ --entrypoint $HOME/dev/TS.ITS/virtualization/docker/docker-entrypoint.sh \ -v "${PWD}/../..:$HOME/dev/TS.ITS_r1" \ --entrypoint $HOME/dev/TS.ITS_r1/virtualization/docker/docker-entrypoint.sh \ alpine-its:latest "$@" # -p 0.0.0.0:80:80 \ # -p 0.0.0.0:443:443 \ Loading
switch_its_r1.sh 0 → 100755 +54 −0 Original line number Diff line number Diff line #!/bin/bash #set -e set -vx BASE_PATH=`pwd` git checkout devel git submodule update --init --recursive --remote cd $BASE_PATH/ttcn git checkout devel for i in `find $BASE_PATH/ttcn -type d -name "Ats*"` do cd $i git checkout devel done for i in `find $BASE_PATH/ttcn/Ats* -type d -name "asn1"` do cd $i git checkout testing SUB_DIRS=`find . -type d` if [ "SUB_DIRS" != "" ] then for j in $SUB_DIRS do cd $j git checkout testing cd - done fi done cd $BASE_PATH if [ ! -f ./titan-test-system-framework ] then git clone --recurse-submodules --single-branch --branch devel https://labs.etsi.org/rep/cti-tools/titan-test-system-framework.git cd ./titan-test-system-framework else cd ./titan-test-system-framework git checkout devel fi cd ./ttcn/LibHttp ln -sf module_its.mk module.mk cd $BASE_PATH/ttcn/LibIts git checkout devel cd $BASE_PATH cp ./ttcn/patch_lib_common_titan/module.mk ./ttcn/LibCommon/ cp ./ttcn/patch_lib_common_titan/ttcn/* ./ttcn/LibCommon/ttcn exit 0
virtualization/docker/Dockerfile +7 −6 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ FROM alpine:3.16 # Install dependencies RUN apk update && \ apk add --no-cache autoconf automake sudo make git g++ diffutils expect openssl-dev libxml2-dev libxml2-utils libxslt-dev libtool ncurses-dev jsoncpp-dev readline-dev flex bison perl libexecinfo-dev bash libedit libedit-dev lksctp-tools lksctp-tools-dev libpcap-dev apk add --no-cache autoconf automake sudo make git g++ diffutils expect openssl-dev libxml2-dev libxml2-utils libxslt-dev libtool ncurses-dev jsoncpp-dev readline-dev flex bison perl libexecinfo-dev bash libedit libedit-dev lksctp-tools lksctp-tools-dev libpcap-dev curl # Create user and sudouser RUN \ Loading @@ -22,15 +22,16 @@ WORKDIR /home/etsi RUN \ mkdir -p frameworks dev tmp \ && cd frameworks \ && git clone --branch=vlm_test https://github.com/fillabs/asn1c.git ./asn1c \ && cd ./asn1c \ && git clone --branch=vlm_test https://github.com/fillabs/asn1c.git ./asn1c.denis \ && cd ./asn1c.denis \ && autoreconf -iv && ./configure --prefix=${HOME} && make install \ && cd - \ && mkdir -p titan && cd ./titan \ && git clone https://github.com/eclipse/titan.core.git || exit 1 WORKDIR /home/etsi/frameworks/titan.core/ WORKDIR /home/etsi/frameworks/titan/titan.core/ # Setup ENV variables ENV TTCN3_DIR=/home/etsi/frameworks/titan.core/Install ENV TTCN3_DIR=/home/etsi/frameworks/titan/titan.core/Install ENV PATH=$TTCN3_DIR/bin:$PATH \ LD_LIBRARY_PATH=$TTCN3_DIR/lib:$LD_LIBRARY_PATH Loading @@ -51,6 +52,6 @@ WORKDIR /home/etsi/dev EXPOSE 80/tcp 443/tcp 12340-12349/udp ENTRYPOINT ["/home/etsi/dev/cise/virtualization/docker/docker-entrypoint.sh"] ENTRYPOINT ["/home/etsi/dev/TS.ITS/virtualization/docker/docker-entrypoint.sh"] CMD ["help"] No newline at end of file
virtualization/docker/docker-entrypoint.sh +10 −1 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ usage() { done } commands="help,build,clean,list,modulepar,rebuild,run,version" commands="help,build,clean,ip,list,modulepar,ping,rebuild,build-run,run,version" if [ $# == 0 ]; then usage Loading @@ -33,15 +33,24 @@ case "$1" in clean) cd ${GEN_DIR} && make clean ;; ip) ip address ;; list) ${cli} -l ;; modulepar) ${cli} -p ;; ping) sudo ping $2 ;; rebuild) cd ${GEN_DIR} && rm -fr ./bin ./build ; make ;; build-run) d ${GEN_DIR}/scripts && ./run_all.bash 0 ;; run) cd ${GEN_DIR}/scripts && ./run_all.bash ;; Loading
virtualization/docker/docker-run.sh +5 −4 Original line number Diff line number Diff line #!/bin/bash set -exo pipefail set +vx cd "$(dirname ${BASH_SOURCE})" docker run --rm -it \ -w $HOME/dev/TS.ITS \ -e GEN_DIR=$HOME/dev/TS.ITS \ -w $HOME/dev/TS.ITS_r1 \ -e GEN_DIR=$HOME/dev/TS.ITS_r1 \ -u "$(id -u):$(id -g)" \ -v "${PWD}/../..:$HOME/dev/TS.ITS" \ --entrypoint $HOME/dev/TS.ITS/virtualization/docker/docker-entrypoint.sh \ -v "${PWD}/../..:$HOME/dev/TS.ITS_r1" \ --entrypoint $HOME/dev/TS.ITS_r1/virtualization/docker/docker-entrypoint.sh \ alpine-its:latest "$@" # -p 0.0.0.0:80:80 \ # -p 0.0.0.0:443:443 \