Add OSMO_*_BRANCH environment variables for build args

Previously we could only set OSMO_TTCN3_BRANCH as environment variable
to build a test other than master.

This patch adds environment variables for all osmo-*-master images which
allow docker tests to be executed for an arbitrary commit.

The origin/ prefix from the git checkout command is removed so the
*_BRANCH variable doesn't have to contain branch names, but van also
contain arbitrary commits. This shouldn't have any adverse effect as we
only have one remote in the checkout.

Change-Id: If3bc5fae07cf63c4fef68306be4c4328660bc869
changes/79/13779/1
Daniel Willmann 4 years ago
parent a7deb5d7a8
commit b59a9ed8d4
  1. 24
      make/Makefile
  2. 2
      osmo-bsc-master/Dockerfile
  3. 2
      osmo-bts-master/Dockerfile
  4. 2
      osmo-ggsn-master/Dockerfile
  5. 2
      osmo-hlr-master/Dockerfile
  6. 2
      osmo-hnbgw-master/Dockerfile
  7. 2
      osmo-mgw-master/Dockerfile
  8. 2
      osmo-msc-master/Dockerfile
  9. 7
      osmo-nitb-master/Dockerfile
  10. 2
      osmo-pcu-master/Dockerfile
  11. 2
      osmo-sgsn-master/Dockerfile
  12. 2
      osmo-sip-master/Dockerfile
  13. 2
      osmo-stp-master/Dockerfile

@ -17,6 +17,18 @@ REGISTRY_HOST?=docker.io
USERNAME?=$(USER)
NAME?=$(shell basename $(CURDIR))
OSMO_TTCN3_BRANCH?=master
OSMO_BSC_BRANCH?=master
OSMO_BTS_BRANCH?=master
OSMO_GGSN_BRANCH?=master
OSMO_HLR_BRANCH?=master
OSMO_IUH_BRANCH?=master
OSMO_MGW_BRANCH?=master
OSMO_MSC_BRANCH?=master
OSMO_NITB_BRANCH?=master
OSMO_PCU_BRANCH?=master
OSMO_SGSN_BRANCH?=master
OSMO_SIP_BRANCH?=master
OSMO_STP_BRANCH?=master
PULL?=
RELEASE_SUPPORT := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))/.make-release-support
@ -42,6 +54,18 @@ post-push:
docker-build: .release
docker build --build-arg USER=$(USERNAME) --build-arg OSMO_TTCN3_BRANCH=$(OSMO_TTCN3_BRANCH) \
--build-arg OSMO_BSC_BRANCH=$(OSMO_BSC_BRANCH) \
--build-arg OSMO_BTS_BRANCH=$(OSMO_BTS_BRANCH) \
--build-arg OSMO_GGSN_BRANCH=$(OSMO_GGSN_BRANCH) \
--build-arg OSMO_HLR_BRANCH=$(OSMO_HLR_BRANCH) \
--build-arg OSMO_IUH_BRANCH=$(OSMO_IUH_BRANCH) \
--build-arg OSMO_MGW_BRANCH=$(OSMO_MGW_BRANCH) \
--build-arg OSMO_MSC_BRANCH=$(OSMO_MSC_BRANCH) \
--build-arg OSMO_NITB_BRANCH=$(OSMO_NITB_BRANCH) \
--build-arg OSMO_PCU_BRANCH=$(OSMO_PCU_BRANCH) \
--build-arg OSMO_SGSN_BRANCH=$(OSMO_SGSN_BRANCH) \
--build-arg OSMO_SIP_BRANCH=$(OSMO_SIP_BRANCH) \
--build-arg OSMO_STP_BRANCH=$(OSMO_STP_BRANCH) \
$(PULL) -t $(IMAGE):latest .
@DOCKER_MAJOR=$(shell docker -v | sed -e 's/.*version //' -e 's/,.*//' | cut -d\. -f1) ; \
DOCKER_MINOR=$(shell docker -v | sed -e 's/.*version //' -e 's/,.*//' | cut -d\. -f2) ; \

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

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

@ -25,7 +25,7 @@ ARG OSMO_GGSN_BRANCH="master"
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 fetch && git checkout -f -B $OSMO_GGSN_BRANCH $OSMO_GGSN_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
autoreconf -fi && \
./configure && \

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

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

@ -30,7 +30,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 fetch && git checkout -f -B $OSMO_MGW_BRANCH $OSMO_MGW_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
autoreconf -fi && \
./configure && \

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

@ -25,11 +25,14 @@ RUN apt-get update && \
WORKDIR /tmp
ARG OSMO_NITB_BRANCH="master"
RUN git clone git://git.osmocom.org/openbsc.git
ADD http://git.osmocom.org/openbsc/patch /tmp/commit-openbsc
ADD http://git.osmocom.org/openbsc/patch?h=$OSMO_NITB_BRANCH /tmp/commit-openbsc
RUN cd openbsc/openbsc && \
git fetch && git checkout -f -B master origin/master && \
git fetch && git checkout -f -B $OSMO_NITB_BRANCH $OSMO_NITB_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
autoreconf -fi && \
./configure --enable-nat --enable-osmo-bsc --enable-smpp && \
make -j8 install && \

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

@ -32,7 +32,7 @@ RUN git clone git://git.osmocom.org/osmo-sgsn.git
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 fetch && git checkout -f -B $OSMO_SGSN_BRANCH $OSMO_SGSN_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
autoreconf -fi && \
./configure && \

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

@ -26,7 +26,7 @@ ARG OSMO_STP_BRANCH="master"
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 fetch && git checkout -f -B $OSMO_STP_BRANCH $OSMO_STP_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
autoreconf -fi && \
./configure && \

Loading…
Cancel
Save