From 7fa7bbe095eb03c1262d1538c09f98de5cea68ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Molinero=20Fern=C3=A1ndez?= Date: Fri, 22 May 2020 18:52:24 +0200 Subject: [PATCH] Always pull images in CI --- .gitlab-ci.yml | 2 +- Makefile | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9e03ec5..589e425 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,7 +19,7 @@ build:images: before_script: - 'apk add --no-cache coreutils git make xz' script: - - 'make build-image save-image' + - 'make IMAGE_BUILD_OPTS="--pull" build-image save-image' artifacts: expire_in: '1 day' paths: diff --git a/Makefile b/Makefile index ac6ee8e..16310fb 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,8 @@ ifneq ($(wildcard $(VERSION_FILE)),) IMAGE_VERSION := $(shell cat '$(VERSION_FILE)') endif +IMAGE_BUILD_OPTS := + IMAGE_TARBALL := $(DISTDIR)/$(IMAGE_PROJECT).txz ################################################## @@ -35,7 +37,7 @@ all: save-image .PHONY: build-image build-image: - '$(DOCKER)' build \ + '$(DOCKER)' build $(IMAGE_BUILD_OPTS) \ --tag '$(IMAGE_NAME):$(IMAGE_VERSION)' \ --tag '$(IMAGE_NAME):latest' \ --file '$(DOCKERFILE)' ./