make/Makefile: allow overriding OSMO_TTCN3_BRANCH
Set the OSMO_TTCN3_BRANCH build argument from ttcn3-*/Dockerfile from the environment variable of the same name, so it can be changed when building the images with 'make' or './jenkins.sh'. Dockerfiles that do not have a OSMO_TCCN3_BRANCH build arg produce a warning. But this is also the case with Dockerfiles that don't have an USER build arg, and avoiding the warning would only be possible with a much more complex patch. Change-Id: If2c312ff9206d1613fc19f41bd088c9aad523684
This commit is contained in:
parent
618c7abc72
commit
ee386a6731
|
@ -18,6 +18,9 @@ Environment variables:
|
|||
* `IMAGE_SUFFIX`: the version of the Osmocom stack to run the testsuite
|
||||
against. Default is `master`, set this to `latest` to test the last
|
||||
stable releases.
|
||||
* `OSMO_TTCN3_BRANCH`: [osmo-ttcn3-hacks.git](https://git.osmocom.org/osmo-ttcn3-hacks/)
|
||||
branch, which will be used when building a `ttcn3-*` docker image.
|
||||
Defaults to `master`.
|
||||
* `NO_DOCKER_IMAGE_BUILD`: when set to `1`, it won't try to update the
|
||||
containers (see "caching" below)
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
REGISTRY_HOST?=docker.io
|
||||
USERNAME?=$(USER)
|
||||
NAME?=$(shell basename $(CURDIR))
|
||||
OSMO_TTCN3_BRANCH?=master
|
||||
|
||||
RELEASE_SUPPORT := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))/.make-release-support
|
||||
IMAGE?=$(REGISTRY_HOST)/$(USER)/$(NAME)
|
||||
|
@ -39,7 +40,8 @@ post-push:
|
|||
|
||||
|
||||
docker-build: .release
|
||||
docker build --build-arg USER=$(USERNAME) -t $(IMAGE):latest .
|
||||
docker build --build-arg USER=$(USERNAME) --build-arg OSMO_TTCN3_BRANCH=$(OSMO_TTCN3_BRANCH) \
|
||||
-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) ; \
|
||||
|
||||
|
|
Loading…
Reference in New Issue