ttcn3: move prepare code to shared script
Move the git fetch/checkout code and make call to build the testsuite, to debian-stretch-titan/ttcn3-docker-prepare.sh. In the next patch, I will extend the script to update deps right before building too (e.g. because OSMO_TTCN3_BRANCH changed). Related: OS#5017 Change-Id: I4b5bedf058dc527e821f9b7204c632820e671af9
This commit is contained in:
parent
73d23109b1
commit
892d910444
|
@ -61,3 +61,5 @@ RUN if ! diff -q /tmp/deps-Makefile /osmo-ttcn3-hacks/deps/Makefile; then \
|
||||||
git pull && \
|
git pull && \
|
||||||
make deps; \
|
make deps; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ADD ttcn3-docker-prepare.sh /usr/local/bin/ttcn3-docker-prepare
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
if [ $# -lt 2 ]; then
|
||||||
|
echo
|
||||||
|
echo "usage: ttcn3-docker-prepare OSMO_TTCN3_BRANCH PROJECT [PROJECT ...]"
|
||||||
|
echo "arguments:"
|
||||||
|
echo " OSMO_TTCN3_BRANCH: as passed from docker"
|
||||||
|
echo " PROJECT: make target from osmo-ttcn3-hacks.git, e.g. 'msc'"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -x
|
||||||
|
OSMO_TTCN3_BRANCH=$1
|
||||||
|
PROJECT=$2
|
||||||
|
|
||||||
|
cd /osmo-ttcn3-hacks
|
||||||
|
|
||||||
|
git fetch
|
||||||
|
git checkout "$OSMO_TTCN3_BRANCH"
|
||||||
|
|
||||||
|
if git symbolic-ref -q HEAD; then
|
||||||
|
git reset --hard origin/"$OSMO_TTCN3_BRANCH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
git rev-parse --abbrev-ref HEAD
|
||||||
|
git rev-parse HEAD
|
||||||
|
|
||||||
|
make "$PROJECT"
|
|
@ -3,12 +3,7 @@ FROM $USER/debian-stretch-titan
|
||||||
ARG OSMO_TTCN3_BRANCH="master"
|
ARG OSMO_TTCN3_BRANCH="master"
|
||||||
|
|
||||||
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
||||||
RUN cd osmo-ttcn3-hacks && \
|
RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" bsc
|
||||||
git fetch && \
|
|
||||||
git checkout $OSMO_TTCN3_BRANCH && \
|
|
||||||
(git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \
|
|
||||||
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
|
|
||||||
make bsc
|
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,7 @@ FROM $USER/debian-stretch-titan
|
||||||
ARG OSMO_TTCN3_BRANCH="master"
|
ARG OSMO_TTCN3_BRANCH="master"
|
||||||
|
|
||||||
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
||||||
RUN cd osmo-ttcn3-hacks && \
|
RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" bsc-nat
|
||||||
git fetch && \
|
|
||||||
git checkout $OSMO_TTCN3_BRANCH && \
|
|
||||||
(git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \
|
|
||||||
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
|
|
||||||
make bsc-nat
|
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,7 @@ FROM $USER/debian-stretch-titan
|
||||||
ARG OSMO_TTCN3_BRANCH="master"
|
ARG OSMO_TTCN3_BRANCH="master"
|
||||||
|
|
||||||
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
||||||
RUN cd osmo-ttcn3-hacks && \
|
RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" bts
|
||||||
git fetch && \
|
|
||||||
git checkout $OSMO_TTCN3_BRANCH && \
|
|
||||||
(git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \
|
|
||||||
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
|
|
||||||
make deps-update bts
|
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,7 @@ FROM $USER/debian-stretch-titan
|
||||||
ARG OSMO_TTCN3_BRANCH="master"
|
ARG OSMO_TTCN3_BRANCH="master"
|
||||||
|
|
||||||
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
||||||
RUN cd osmo-ttcn3-hacks && \
|
RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" fr fr-net
|
||||||
git fetch && \
|
|
||||||
git checkout $OSMO_TTCN3_BRANCH && \
|
|
||||||
(git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \
|
|
||||||
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
|
|
||||||
make fr fr-net
|
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,7 @@ FROM $USER/debian-stretch-titan
|
||||||
ARG OSMO_TTCN3_BRANCH="master"
|
ARG OSMO_TTCN3_BRANCH="master"
|
||||||
|
|
||||||
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
||||||
RUN cd osmo-ttcn3-hacks && \
|
RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" gbproxy
|
||||||
git fetch && \
|
|
||||||
git checkout $OSMO_TTCN3_BRANCH && \
|
|
||||||
(git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \
|
|
||||||
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
|
|
||||||
make gbproxy
|
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,7 @@ FROM $USER/debian-stretch-titan
|
||||||
ARG OSMO_TTCN3_BRANCH="master"
|
ARG OSMO_TTCN3_BRANCH="master"
|
||||||
|
|
||||||
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
||||||
RUN cd osmo-ttcn3-hacks && \
|
RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" ggsn_tests
|
||||||
git fetch && \
|
|
||||||
git checkout $OSMO_TTCN3_BRANCH && \
|
|
||||||
(git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \
|
|
||||||
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
|
|
||||||
make ggsn_tests
|
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,7 @@ FROM $USER/debian-stretch-titan
|
||||||
ARG OSMO_TTCN3_BRANCH="master"
|
ARG OSMO_TTCN3_BRANCH="master"
|
||||||
|
|
||||||
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
||||||
RUN cd osmo-ttcn3-hacks && \
|
RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" hlr
|
||||||
git fetch && \
|
|
||||||
git checkout $OSMO_TTCN3_BRANCH && \
|
|
||||||
(git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \
|
|
||||||
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
|
|
||||||
make deps-update hlr
|
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,7 @@ FROM $USER/debian-stretch-titan
|
||||||
ARG OSMO_TTCN3_BRANCH="master"
|
ARG OSMO_TTCN3_BRANCH="master"
|
||||||
|
|
||||||
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
||||||
RUN cd osmo-ttcn3-hacks && \
|
RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" mgw
|
||||||
git fetch && \
|
|
||||||
git checkout $OSMO_TTCN3_BRANCH && \
|
|
||||||
(git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \
|
|
||||||
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
|
|
||||||
make mgw
|
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,7 @@ FROM $USER/debian-stretch-titan
|
||||||
ARG OSMO_TTCN3_BRANCH="master"
|
ARG OSMO_TTCN3_BRANCH="master"
|
||||||
|
|
||||||
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
||||||
RUN cd osmo-ttcn3-hacks && \
|
RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" msc
|
||||||
git fetch && \
|
|
||||||
git checkout $OSMO_TTCN3_BRANCH && \
|
|
||||||
(git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \
|
|
||||||
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
|
|
||||||
make msc
|
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,7 @@ FROM $USER/debian-stretch-titan
|
||||||
ARG OSMO_TTCN3_BRANCH="master"
|
ARG OSMO_TTCN3_BRANCH="master"
|
||||||
|
|
||||||
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
||||||
RUN cd osmo-ttcn3-hacks && \
|
RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" sysinfo
|
||||||
git fetch && \
|
|
||||||
git checkout $OSMO_TTCN3_BRANCH && \
|
|
||||||
(git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \
|
|
||||||
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
|
|
||||||
make sysinfo
|
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,7 @@ FROM $USER/debian-stretch-titan
|
||||||
ARG OSMO_TTCN3_BRANCH="master"
|
ARG OSMO_TTCN3_BRANCH="master"
|
||||||
|
|
||||||
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
||||||
RUN cd osmo-ttcn3-hacks && \
|
RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" pcu
|
||||||
git fetch && \
|
|
||||||
git checkout $OSMO_TTCN3_BRANCH && \
|
|
||||||
(git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \
|
|
||||||
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
|
|
||||||
make pcu
|
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,7 @@ FROM $USER/debian-stretch-titan
|
||||||
ARG OSMO_TTCN3_BRANCH="master"
|
ARG OSMO_TTCN3_BRANCH="master"
|
||||||
|
|
||||||
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
||||||
RUN cd osmo-ttcn3-hacks && \
|
RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" remsim
|
||||||
git fetch && \
|
|
||||||
git checkout $OSMO_TTCN3_BRANCH && \
|
|
||||||
(git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \
|
|
||||||
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
|
|
||||||
make deps-update remsim
|
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,7 @@ FROM $USER/debian-stretch-titan
|
||||||
ARG OSMO_TTCN3_BRANCH="master"
|
ARG OSMO_TTCN3_BRANCH="master"
|
||||||
|
|
||||||
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
||||||
RUN cd osmo-ttcn3-hacks && \
|
RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" sccp
|
||||||
git fetch && \
|
|
||||||
git checkout $OSMO_TTCN3_BRANCH && \
|
|
||||||
(git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \
|
|
||||||
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
|
|
||||||
make sccp
|
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,7 @@ FROM $USER/debian-stretch-titan
|
||||||
ARG OSMO_TTCN3_BRANCH="master"
|
ARG OSMO_TTCN3_BRANCH="master"
|
||||||
|
|
||||||
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
||||||
RUN cd osmo-ttcn3-hacks && \
|
RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" sgsn
|
||||||
git fetch && \
|
|
||||||
git checkout $OSMO_TTCN3_BRANCH && \
|
|
||||||
(git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \
|
|
||||||
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
|
|
||||||
make sgsn
|
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,7 @@ FROM $USER/debian-stretch-titan
|
||||||
ARG OSMO_TTCN3_BRANCH="master"
|
ARG OSMO_TTCN3_BRANCH="master"
|
||||||
|
|
||||||
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
||||||
RUN cd osmo-ttcn3-hacks && \
|
RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" sip
|
||||||
git fetch && \
|
|
||||||
git checkout $OSMO_TTCN3_BRANCH && \
|
|
||||||
(git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \
|
|
||||||
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
|
|
||||||
make sip
|
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,7 @@ FROM $USER/debian-stretch-titan
|
||||||
ARG OSMO_TTCN3_BRANCH="master"
|
ARG OSMO_TTCN3_BRANCH="master"
|
||||||
|
|
||||||
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
||||||
RUN cd osmo-ttcn3-hacks && \
|
RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" smlc
|
||||||
git fetch && \
|
|
||||||
git checkout $OSMO_TTCN3_BRANCH && \
|
|
||||||
(git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \
|
|
||||||
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
|
|
||||||
make smlc
|
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,7 @@ FROM $USER/debian-stretch-titan
|
||||||
ARG OSMO_TTCN3_BRANCH="master"
|
ARG OSMO_TTCN3_BRANCH="master"
|
||||||
|
|
||||||
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
|
||||||
RUN cd osmo-ttcn3-hacks && \
|
RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" stp
|
||||||
git fetch && \
|
|
||||||
git checkout $OSMO_TTCN3_BRANCH && \
|
|
||||||
(git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_TTCN3_BRANCH || exit 1); \
|
|
||||||
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
|
|
||||||
make stp
|
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue