print branch name and git commit hash during docker container build

This is quite useful when looking at jenkins logs to know which exact
version was built at the time.

Change-Id: Id52c382b454e2beecf46820752aeff15b2c1a0ae
This commit is contained in:
Harald Welte 2019-03-29 14:12:28 +01:00
parent 2e3a5c1c53
commit cffe1022b5
24 changed files with 26 additions and 1 deletions

View File

@ -51,6 +51,7 @@ ADD http://git.osmocom.org/libosmocore/patch?h=$LIBOSMOCORE_BRANCH /tmp/commit-l
RUN cd libosmocore \
&& git fetch && git checkout -f -B $LIBOSMOCORE_BRANCH origin/$LIBOSMOCORE_BRANCH \
&& git rev-parse --abbrev-ref HEAD && git rev-parse HEAD \
&& autoreconf -fi \
&& ./configure \
--disable-doxygen \
@ -65,6 +66,7 @@ ADD http://git.osmocom.org/gr-gsm/patch?h=$GR_GSM_BRANCH /tmp/commit-gr-gsm
RUN cd gr-gsm \
&& git fetch && git checkout -f -B $GR_GSM_BRANCH origin/$GR_GSM_BRANCH \
&& git rev-parse HEAD \
&& mkdir build/ \
&& cd build/ \
&& cmake \

View File

@ -33,6 +33,7 @@ ADD http://git.osmocom.org/osmo-bsc/patch?h=$OSMO_BSC_BRANCH /tmp/commit-osmo-bs
RUN cd osmo-bsc && \
git fetch && git checkout -f -B $OSMO_BSC_BRANCH origin/$OSMO_BSC_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
autoreconf -fi && \
./configure && \
make -j8 install

View File

@ -34,6 +34,7 @@ ADD http://git.osmocom.org/osmo-bts/patch?h=$OSMO_BTS_BRANCH /tmp/commit-osmo-bt
RUN cd osmo-bts && \
git fetch && git checkout -f -B $OSMO_BTS_BRANCH origin/$OSMO_BTS_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
autoreconf -fi && \
./configure --enable-trx && \
make -j8 install

View File

@ -26,6 +26,7 @@ RUN git clone git://git.osmocom.org/osmo-ggsn.git
ADD http://git.osmocom.org/osmo-ggsn/patch/?h=$OSMO_GGSN_BRANCH /tmp/commit
RUN cd osmo-ggsn && \
git fetch && git checkout -f -B $OSMO_GGSN_BRANCH origin/$OSMO_GGSN_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
autoreconf -fi && \
./configure && \
make -j8 install && \

View File

@ -31,6 +31,7 @@ ADD http://git.osmocom.org/osmo-hlr/patch?h=$OSMO_HLR_BRANCH /tmp/commit-osmo-hl
RUN cd osmo-hlr && \
git fetch && git checkout -f -B $OSMO_HLR_BRANCH origin/$OSMO_HLR_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
autoreconf -fi && \
./configure && \
make -j8 install

View File

@ -31,6 +31,7 @@ ADD http://git.osmocom.org/osmo-iuh/patch?h=$OSMO_IUH_BRANCH /tmp/commit-osmo-mg
RUN cd osmo-iuh && \
git fetch && git checkout -f -B $OSMO_IUH_BRANCH origin/$OSMO_IUH_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
autoreconf -fi && \
./configure && \
make -j8 install && \

View File

@ -31,6 +31,7 @@ ADD http://git.osmocom.org/osmo-mgw/patch?h=$OSMO_MGW_BRANCH /tmp/commit-osmo-mg
RUN cd osmo-mgw && \
git fetch && git checkout -f -B $OSMO_MGW_BRANCH origin/$OSMO_MGW_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
autoreconf -fi && \
./configure && \
make -j8 install && \

View File

@ -38,6 +38,7 @@ ADD http://git.osmocom.org/osmo-msc/patch?h=$OSMO_MSC_BRANCH /tmp/commit-osmo-ms
RUN cd osmo-msc && \
git fetch && git checkout -f -B $OSMO_MSC_BRANCH origin/$OSMO_MSC_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
autoreconf -fi && \
./configure --enable-smpp --enable-iu && \
make -j8 install

View File

@ -29,6 +29,7 @@ ADD http://git.osmocom.org/osmo-pcu/patch?h=$OSMO_PCU_BRANCH /tmp/commit-osmo-pc
RUN cd osmo-pcu && \
git fetch && git checkout -f -B $OSMO_PCU_BRANCH origin/$OSMO_PCU_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
autoreconf -fi && \
./configure --enable-trx && \
make -j8 install

View File

@ -33,6 +33,7 @@ ADD http://git.osmocom.org/osmo-sgsn/patch?h=$OSMO_SGSN_BRANCH /tmp/commit
RUN cd osmo-sgsn && \
git fetch && git checkout -f -B $OSMO_SGSN_BRANCH origin/$OSMO_SGSN_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
autoreconf -fi && \
./configure && \
make -j8 install && \

View File

@ -37,6 +37,7 @@ ADD http://git.osmocom.org/osmo-sip-connector/patch?h=$OSMO_SIP_BRANCH /tmp/comm
RUN cd osmo-sip-connector && \
git fetch && git checkout -f -B $OSMO_SIP_BRANCH origin/$OSMO_SIP_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
autoreconf -fi && \
./configure --enable-smpp --enable-iu && \
make -j8 install

View File

@ -27,6 +27,7 @@ RUN git clone git://git.osmocom.org/libosmo-sccp.git
ADD http://git.osmocom.org/libosmo-sccp/patch?h=$OSMO_STP_BRANCH /tmp/commit
RUN cd libosmo-sccp && \
git fetch && git checkout -f -B $OSMO_STP_BRANCH origin/$OSMO_STP_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
autoreconf -fi && \
./configure && \
make -j8 install && \

View File

@ -25,7 +25,8 @@ RUN git clone git://git.osmocom.org/osmocom-bb.git
ADD http://git.osmocom.org/osmocom-bb/patch?h=$OSMO_BB_BRANCH /tmp/commit
RUN cd osmocom-bb && \
git fetch && git checkout -f -B $OSMO_BB_BRANCH origin/$OSMO_BB_BRANCH
git fetch && git checkout -f -B $OSMO_BB_BRANCH origin/$OSMO_BB_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD
RUN cd osmocom-bb/src/host/trxcon && \
autoreconf -fi && \

View File

@ -17,6 +17,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/comm
RUN cd osmo-ttcn3-hacks && \
git fetch && \
git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
make bsc
VOLUME /data

View File

@ -17,6 +17,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/comm
RUN cd osmo-ttcn3-hacks && \
git fetch && \
git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
make bsc-nat
VOLUME /data

View File

@ -17,6 +17,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/comm
RUN cd osmo-ttcn3-hacks && \
git fetch && \
git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
make deps-update bts
VOLUME /data

View File

@ -13,6 +13,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/comm
RUN cd osmo-ttcn3-hacks && \
git fetch && \
git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
make ggsn_tests
VOLUME /data

View File

@ -17,6 +17,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/comm
RUN cd osmo-ttcn3-hacks && \
git fetch && \
git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
make deps-update hlr
VOLUME /data

View File

@ -14,6 +14,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/comm
RUN cd osmo-ttcn3-hacks && \
git fetch && \
git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
make mgw
VOLUME /data

View File

@ -17,6 +17,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/comm
RUN cd osmo-ttcn3-hacks && \
git fetch && \
git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
make msc
VOLUME /data

View File

@ -14,6 +14,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/comm
RUN cd osmo-ttcn3-hacks && \
git fetch && \
git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
make sysinfo
VOLUME /data

View File

@ -17,6 +17,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/comm
RUN cd osmo-ttcn3-hacks && \
git fetch && \
git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
make pcu
VOLUME /data

View File

@ -17,6 +17,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/comm
RUN cd osmo-ttcn3-hacks && \
git fetch && \
git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
make sgsn
VOLUME /data

View File

@ -17,6 +17,7 @@ ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/comm
RUN cd osmo-ttcn3-hacks && \
git fetch && \
git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
make sip
VOLUME /data