From d2d0f362442a7188411f57360f296f60f9a0f59b Mon Sep 17 00:00:00 2001 From: Zygmunt Krynicki Date: Thu, 15 May 2025 22:39:30 +0200 Subject: [PATCH] ci: git restore-mtime .image-garden.mk This fixes the long standing issue affecting caching of the image between the image-* jobs and the spread-* jobs. Signed-off-by: Zygmunt Krynicki --- .gitlab-ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 393f6c72c..eb019d8a7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -199,6 +199,10 @@ coverity: CACHE_POLICY: pull-push CACHE_COMPRESSION_LEVEL: fastest before_script: + # Restore the mtime of the .image-garden.mk file. This helps make determine + # if there's actually something to do correctly. Git does not preserve the + # mtime of files during checkout. + - git restore-mtime .image-garden.mk # Prepare the image in dry-run mode. This helps in debugging cache misses # when files are not cached correctly by the runner, causing the build section # below to always do hevy-duty work. @@ -265,6 +269,10 @@ image-ubuntu-cloud-24.04-x86_64: SPREAD_ARGS: "garden:$GARDEN_SYSTEM:" SPREAD_GOARCH: amd64 before_script: + # Restore the mtime of the .image-garden.mk file. This helps make determine + # if there's actually something to do correctly. Git does not preserve the + # mtime of files during checkout. + - git restore-mtime .image-garden.mk # Prepare the image in dry-run mode. This helps in debugging cache misses # when files are not cached correctly by the runner, causing the build section # below to always do hevy-duty work.