From 9ad7bbf24193a0b92da2c214205b8f4e8dba9eae Mon Sep 17 00:00:00 2001 From: Jackson West Date: Thu, 7 Nov 2024 02:18:09 +0000 Subject: [PATCH] fix --- projects/tinkerbell/hook/Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/projects/tinkerbell/hook/Makefile b/projects/tinkerbell/hook/Makefile index 10b25a4a1e..2a29254818 100644 --- a/projects/tinkerbell/hook/Makefile +++ b/projects/tinkerbell/hook/Makefile @@ -144,9 +144,11 @@ $(LINUXKIT_CACHE_FILE): $(PROJECT_DEPENDENCIES_TARGETS) @mkdir -p $(@D) cp $(BINARY_DEPS_DIR)/linux-$(BUILDER_PLATFORM_ARCH)/eksa/linuxkit/linuxkit/linuxkit $@ -.PHONY: populate-linuxkit-cache -populate-linuxkit-cache: - @git -C $(REPO) checkout -- linuxkit-templates/hook.template.yaml; \ +#.PHONY: populate-linuxkit-cache +#populate-linuxkit-cache: +hook/cache/linuxkit/index.json: + @source $(BUILD_LIB)/common.sh; \ + git -C $(REPO) checkout -- linuxkit-templates/hook.template.yaml; \ sed -i 's/[^ ]*linuxkit\/\([^:]*\)\(:.*$$\)/$(subst /,\/,$(LINUXKIT_IMAGE_REPO))\/linuxkit\/\1:$(LATEST_TAG)/' $(REPO)/linuxkit-templates/hook.template.yaml; \ images=(); \ while read -r image; do \ @@ -171,9 +173,9 @@ populate-linuxkit-cache: # Using sed they are pulled back out so that we can run cache pull with retries since we tend to see # issues from time to time pulling from ecr $(CREATE_HOOK_FILES_PATTERN)-%: BUILD_ARCH=$(if $(findstring x86_64,$*),amd64,arm64) -$(CREATE_HOOK_FILES_PATTERN)-%: $(LINUXKIT_CACHE_FILE) | populate-linuxkit-cache $$(ENABLE_DOCKER) +$(CREATE_HOOK_FILES_PATTERN)-%: $(LINUXKIT_CACHE_FILE) | hook/cache/linuxkit/index.json $$(ENABLE_DOCKER) @source $(BUILD_LIB)/common.sh && build::common::use_go_version $(GOLANG_VERSION); \ - if [ -f $(REPO)/out/linuxkit-hook-default-$(BUILD_ARCH)/hook-cmdline ]; then echo "remove hook/out before continuing"; exit 1; fi; \ + if [ -f $(REPO)/out/linuxkit-hook-default-$(BUILD_ARCH)/hook-cmdline ]; then echo "rm -rf hook/out before continuing"; exit 1; fi; \ cd $(REPO); \ DEBUG=yes LINUXKIT_VERSION_DEFAULT=$(LINUXKIT_VERSION) HOOK_KERNEL_OCI_BASE=$(IMAGE_REPO)/$(KERNEL_IMAGE_COMPONENT) \ HOOK_LK_CONTAINERS_OCI_BASE=$(IMAGE_REPO)/tinkerbell/ \