From cffe1022b520fe7273ee949935a23eb202a9890e Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 29 Mar 2019 14:12:28 +0100 Subject: [PATCH] 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 --- gr-gsm-master/Dockerfile | 2 ++ osmo-bsc-master/Dockerfile | 1 + osmo-bts-master/Dockerfile | 1 + osmo-ggsn-master/Dockerfile | 1 + osmo-hlr-master/Dockerfile | 1 + osmo-hnbgw-master/Dockerfile | 1 + osmo-mgw-master/Dockerfile | 1 + osmo-msc-master/Dockerfile | 1 + osmo-pcu-master/Dockerfile | 1 + osmo-sgsn-master/Dockerfile | 1 + osmo-sip-master/Dockerfile | 1 + osmo-stp-master/Dockerfile | 1 + osmocom-bb-host-master/Dockerfile | 3 ++- ttcn3-bsc-test/Dockerfile | 1 + ttcn3-bscnat-test/Dockerfile | 1 + ttcn3-bts-test/Dockerfile | 1 + ttcn3-ggsn-test/Dockerfile | 1 + ttcn3-hlr-test/Dockerfile | 1 + ttcn3-mgw-test/Dockerfile | 1 + ttcn3-msc-test/Dockerfile | 1 + ttcn3-nitb-sysinfo/Dockerfile | 1 + ttcn3-pcu-test/Dockerfile | 1 + ttcn3-sgsn-test/Dockerfile | 1 + ttcn3-sip-test/Dockerfile | 1 + 24 files changed, 26 insertions(+), 1 deletion(-) diff --git a/gr-gsm-master/Dockerfile b/gr-gsm-master/Dockerfile index 24c8c95f..1a8a2251 100644 --- a/gr-gsm-master/Dockerfile +++ b/gr-gsm-master/Dockerfile @@ -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 \ diff --git a/osmo-bsc-master/Dockerfile b/osmo-bsc-master/Dockerfile index 5c76688e..5d3d2d5f 100644 --- a/osmo-bsc-master/Dockerfile +++ b/osmo-bsc-master/Dockerfile @@ -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 diff --git a/osmo-bts-master/Dockerfile b/osmo-bts-master/Dockerfile index 69a8d4c5..25d6d664 100644 --- a/osmo-bts-master/Dockerfile +++ b/osmo-bts-master/Dockerfile @@ -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 diff --git a/osmo-ggsn-master/Dockerfile b/osmo-ggsn-master/Dockerfile index 5acdf98f..bd8d815f 100644 --- a/osmo-ggsn-master/Dockerfile +++ b/osmo-ggsn-master/Dockerfile @@ -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 && \ diff --git a/osmo-hlr-master/Dockerfile b/osmo-hlr-master/Dockerfile index 45c3bd52..07d175d7 100644 --- a/osmo-hlr-master/Dockerfile +++ b/osmo-hlr-master/Dockerfile @@ -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 diff --git a/osmo-hnbgw-master/Dockerfile b/osmo-hnbgw-master/Dockerfile index c00d68b5..068025bc 100644 --- a/osmo-hnbgw-master/Dockerfile +++ b/osmo-hnbgw-master/Dockerfile @@ -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 && \ diff --git a/osmo-mgw-master/Dockerfile b/osmo-mgw-master/Dockerfile index 2c9469e6..dcfa7dad 100644 --- a/osmo-mgw-master/Dockerfile +++ b/osmo-mgw-master/Dockerfile @@ -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 && \ diff --git a/osmo-msc-master/Dockerfile b/osmo-msc-master/Dockerfile index fe40d782..619dda18 100644 --- a/osmo-msc-master/Dockerfile +++ b/osmo-msc-master/Dockerfile @@ -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 diff --git a/osmo-pcu-master/Dockerfile b/osmo-pcu-master/Dockerfile index 867f5340..96844102 100644 --- a/osmo-pcu-master/Dockerfile +++ b/osmo-pcu-master/Dockerfile @@ -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 diff --git a/osmo-sgsn-master/Dockerfile b/osmo-sgsn-master/Dockerfile index d87f2955..f941e9c6 100644 --- a/osmo-sgsn-master/Dockerfile +++ b/osmo-sgsn-master/Dockerfile @@ -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 && \ diff --git a/osmo-sip-master/Dockerfile b/osmo-sip-master/Dockerfile index e69cbc73..7340bb32 100644 --- a/osmo-sip-master/Dockerfile +++ b/osmo-sip-master/Dockerfile @@ -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 diff --git a/osmo-stp-master/Dockerfile b/osmo-stp-master/Dockerfile index ae93c10c..57afbb7f 100644 --- a/osmo-stp-master/Dockerfile +++ b/osmo-stp-master/Dockerfile @@ -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 && \ diff --git a/osmocom-bb-host-master/Dockerfile b/osmocom-bb-host-master/Dockerfile index 0cede4b9..8311f80f 100644 --- a/osmocom-bb-host-master/Dockerfile +++ b/osmocom-bb-host-master/Dockerfile @@ -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 && \ diff --git a/ttcn3-bsc-test/Dockerfile b/ttcn3-bsc-test/Dockerfile index 29a121a9..546f33b0 100644 --- a/ttcn3-bsc-test/Dockerfile +++ b/ttcn3-bsc-test/Dockerfile @@ -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 diff --git a/ttcn3-bscnat-test/Dockerfile b/ttcn3-bscnat-test/Dockerfile index b19413ea..047f21cc 100644 --- a/ttcn3-bscnat-test/Dockerfile +++ b/ttcn3-bscnat-test/Dockerfile @@ -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 diff --git a/ttcn3-bts-test/Dockerfile b/ttcn3-bts-test/Dockerfile index 1f5b47c9..d8969bb2 100644 --- a/ttcn3-bts-test/Dockerfile +++ b/ttcn3-bts-test/Dockerfile @@ -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 diff --git a/ttcn3-ggsn-test/Dockerfile b/ttcn3-ggsn-test/Dockerfile index 5ca917bb..6d6aff68 100644 --- a/ttcn3-ggsn-test/Dockerfile +++ b/ttcn3-ggsn-test/Dockerfile @@ -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 diff --git a/ttcn3-hlr-test/Dockerfile b/ttcn3-hlr-test/Dockerfile index afa17fc5..752d442d 100644 --- a/ttcn3-hlr-test/Dockerfile +++ b/ttcn3-hlr-test/Dockerfile @@ -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 diff --git a/ttcn3-mgw-test/Dockerfile b/ttcn3-mgw-test/Dockerfile index e2327b75..bf13d12a 100644 --- a/ttcn3-mgw-test/Dockerfile +++ b/ttcn3-mgw-test/Dockerfile @@ -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 diff --git a/ttcn3-msc-test/Dockerfile b/ttcn3-msc-test/Dockerfile index f812ee03..53aa393c 100644 --- a/ttcn3-msc-test/Dockerfile +++ b/ttcn3-msc-test/Dockerfile @@ -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 diff --git a/ttcn3-nitb-sysinfo/Dockerfile b/ttcn3-nitb-sysinfo/Dockerfile index a50a4345..d0ec87aa 100644 --- a/ttcn3-nitb-sysinfo/Dockerfile +++ b/ttcn3-nitb-sysinfo/Dockerfile @@ -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 diff --git a/ttcn3-pcu-test/Dockerfile b/ttcn3-pcu-test/Dockerfile index 45b22d0d..fbb64f58 100644 --- a/ttcn3-pcu-test/Dockerfile +++ b/ttcn3-pcu-test/Dockerfile @@ -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 diff --git a/ttcn3-sgsn-test/Dockerfile b/ttcn3-sgsn-test/Dockerfile index 038a7654..60ec3337 100644 --- a/ttcn3-sgsn-test/Dockerfile +++ b/ttcn3-sgsn-test/Dockerfile @@ -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 diff --git a/ttcn3-sip-test/Dockerfile b/ttcn3-sip-test/Dockerfile index d7ea0db9..eead3473 100644 --- a/ttcn3-sip-test/Dockerfile +++ b/ttcn3-sip-test/Dockerfile @@ -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