aboutsummaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2019-04-02 11:05:22 +0200
committerOliver Smith <osmith@sysmocom.de>2019-04-02 11:38:26 +0200
commita8be3ff52fb209b7ea319632908bb27373482ceb (patch)
tree98eb5dc2b8a17fb7b9dacb37885d39a9e852702d /make
parent7c53c9e60da8f4cdad054d8914ab42a1a25ab7d1 (diff)
jenkins-common.sh: pull upstream base images
Prevent building docker images on top of outdated Debian images, where the package download feeds have been disabled. Use 'docker build --pull' instead of 'docker build', whenever the "FROM" line in the Dockerfile does not contain '$USER' (meaning this is an upstream image). Checking the FROM line is necessary, as downloading '$USER' images will fail (we never upload those). Related: OS#3869 Change-Id: I1076bbb7d77bdc99f5d60d641c09ce965fb9dfc6
Diffstat (limited to 'make')
-rw-r--r--make/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/make/Makefile b/make/Makefile
index 2321fcf..d4e3c22 100644
--- a/make/Makefile
+++ b/make/Makefile
@@ -17,6 +17,7 @@ REGISTRY_HOST?=docker.io
USERNAME?=$(USER)
NAME?=$(shell basename $(CURDIR))
OSMO_TTCN3_BRANCH?=master
+PULL?=$(PULL)
RELEASE_SUPPORT := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))/.make-release-support
IMAGE?=$(REGISTRY_HOST)/$(USER)/$(NAME)
@@ -41,7 +42,7 @@ post-push:
docker-build: .release
docker build --build-arg USER=$(USERNAME) --build-arg OSMO_TTCN3_BRANCH=$(OSMO_TTCN3_BRANCH) \
- -t $(IMAGE):latest .
+ $(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) ; \