From a672dd1d5ea6fdcc980c2c820263e6e36423ed50 Mon Sep 17 00:00:00 2001
From: lukken <lukken@astron.nl>
Date: Tue, 13 Sep 2022 10:05:33 +0000
Subject: [PATCH] L2SS-947: Ignore pull failure for image builds

---
 sbin/tag_and_push_docker_image.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sbin/tag_and_push_docker_image.sh b/sbin/tag_and_push_docker_image.sh
index 1a702ab44..7d70a6645 100755
--- a/sbin/tag_and_push_docker_image.sh
+++ b/sbin/tag_and_push_docker_image.sh
@@ -161,9 +161,9 @@ if [ ! -z "${1+x}" ] && [ "${1}" != "pull" ]; then
       local_url="${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/${2}"
 
       # If tag is not latest, than it is not a tagged master build and we can
-      # pull the latest image as cache.
+      # pull the latest image as cache (if it already exists).
       if [ "${tag}" != "latest" ]; then
-        docker pull "${local_url}:latest"
+        docker pull "${local_url}:latest" || true
       fi
 
       make build "${1}"
-- 
GitLab