Daniel Willmann has uploaded this change for review. ( https://gerrit.osmocom.org/13779
Change subject: Add OSMO_*_BRANCH environment variables for build args ...................................................................... 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 --- M make/Makefile M osmo-bsc-master/Dockerfile M osmo-bts-master/Dockerfile M osmo-ggsn-master/Dockerfile M osmo-hlr-master/Dockerfile M osmo-hnbgw-master/Dockerfile M osmo-mgw-master/Dockerfile M osmo-msc-master/Dockerfile M osmo-nitb-master/Dockerfile M osmo-pcu-master/Dockerfile M osmo-sgsn-master/Dockerfile M osmo-sip-master/Dockerfile M osmo-stp-master/Dockerfile 13 files changed, 40 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/79/13779/1 diff --git a/make/Makefile b/make/Makefile index 7dfa795..000db25 100644 --- a/make/Makefile +++ b/make/Makefile @@ -17,6 +17,18 @@ 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 @@ 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) ; \ diff --git a/osmo-bsc-master/Dockerfile b/osmo-bsc-master/Dockerfile index 61ac8e4..bcd0573 100644 --- a/osmo-bsc-master/Dockerfile +++ b/osmo-bsc-master/Dockerfile @@ -32,7 +32,7 @@ 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 && \ diff --git a/osmo-bts-master/Dockerfile b/osmo-bts-master/Dockerfile index be58081..f4ddf3a 100644 --- a/osmo-bts-master/Dockerfile +++ b/osmo-bts-master/Dockerfile @@ -33,7 +33,7 @@ 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 && \ diff --git a/osmo-ggsn-master/Dockerfile b/osmo-ggsn-master/Dockerfile index ca4f111..cf84d02 100644 --- a/osmo-ggsn-master/Dockerfile +++ b/osmo-ggsn-master/Dockerfile @@ -25,7 +25,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 fetch && git checkout -f -B $OSMO_GGSN_BRANCH $OSMO_GGSN_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-hlr-master/Dockerfile b/osmo-hlr-master/Dockerfile index 75f29d9..2da7c08 100644 --- a/osmo-hlr-master/Dockerfile +++ b/osmo-hlr-master/Dockerfile @@ -30,7 +30,7 @@ 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 && \ diff --git a/osmo-hnbgw-master/Dockerfile b/osmo-hnbgw-master/Dockerfile index 4334e4f..c89502b 100644 --- a/osmo-hnbgw-master/Dockerfile +++ b/osmo-hnbgw-master/Dockerfile @@ -30,7 +30,7 @@ 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 && \ diff --git a/osmo-mgw-master/Dockerfile b/osmo-mgw-master/Dockerfile index c333b1d..4c6d32a 100644 --- a/osmo-mgw-master/Dockerfile +++ b/osmo-mgw-master/Dockerfile @@ -30,7 +30,7 @@ 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 && \ diff --git a/osmo-msc-master/Dockerfile b/osmo-msc-master/Dockerfile index 49be9c8..c8cfd62 100644 --- a/osmo-msc-master/Dockerfile +++ b/osmo-msc-master/Dockerfile @@ -37,7 +37,7 @@ 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 && \ diff --git a/osmo-nitb-master/Dockerfile b/osmo-nitb-master/Dockerfile index bed228e..d3774da 100644 --- a/osmo-nitb-master/Dockerfile +++ b/osmo-nitb-master/Dockerfile @@ -25,11 +25,14 @@ 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 && \ diff --git a/osmo-pcu-master/Dockerfile b/osmo-pcu-master/Dockerfile index e33748a..7a294a4 100644 --- a/osmo-pcu-master/Dockerfile +++ b/osmo-pcu-master/Dockerfile @@ -28,7 +28,7 @@ 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 && \ diff --git a/osmo-sgsn-master/Dockerfile b/osmo-sgsn-master/Dockerfile index 87513cc..c373564 100644 --- a/osmo-sgsn-master/Dockerfile +++ b/osmo-sgsn-master/Dockerfile @@ -32,7 +32,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 fetch && git checkout -f -B $OSMO_SGSN_BRANCH $OSMO_SGSN_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ diff --git a/osmo-sip-master/Dockerfile b/osmo-sip-master/Dockerfile index 5854221..258b1fe 100644 --- a/osmo-sip-master/Dockerfile +++ b/osmo-sip-master/Dockerfile @@ -36,7 +36,7 @@ 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 && \ diff --git a/osmo-stp-master/Dockerfile b/osmo-stp-master/Dockerfile index 7c59fb0..0a62ed7 100644 --- a/osmo-stp-master/Dockerfile +++ b/osmo-stp-master/Dockerfile @@ -26,7 +26,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 fetch && git checkout -f -B $OSMO_STP_BRANCH $OSMO_STP_BRANCH && \ git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ autoreconf -fi && \ ./configure && \ -- To view, visit https://gerrit.osmocom.org/13779 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If3bc5fae07cf63c4fef68306be4c4328660bc869 Gerrit-Change-Number: 13779 Gerrit-PatchSet: 1 Gerrit-Owner: Daniel Willmann <dwillm...@sysmocom.de>