Skip to content

Commit 9ad7bbf

Browse files
committed
fix
1 parent de0a3aa commit 9ad7bbf

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

projects/tinkerbell/hook/Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,11 @@ $(LINUXKIT_CACHE_FILE): $(PROJECT_DEPENDENCIES_TARGETS)
144144
@mkdir -p $(@D)
145145
cp $(BINARY_DEPS_DIR)/linux-$(BUILDER_PLATFORM_ARCH)/eksa/linuxkit/linuxkit/linuxkit $@
146146

147-
.PHONY: populate-linuxkit-cache
148-
populate-linuxkit-cache:
149-
@git -C $(REPO) checkout -- linuxkit-templates/hook.template.yaml; \
147+
#.PHONY: populate-linuxkit-cache
148+
#populate-linuxkit-cache:
149+
hook/cache/linuxkit/index.json:
150+
@source $(BUILD_LIB)/common.sh; \
151+
git -C $(REPO) checkout -- linuxkit-templates/hook.template.yaml; \
150152
sed -i 's/[^ ]*linuxkit\/\([^:]*\)\(:.*$$\)/$(subst /,\/,$(LINUXKIT_IMAGE_REPO))\/linuxkit\/\1:$(LATEST_TAG)/' $(REPO)/linuxkit-templates/hook.template.yaml; \
151153
images=(); \
152154
while read -r image; do \
@@ -171,9 +173,9 @@ populate-linuxkit-cache:
171173
# Using sed they are pulled back out so that we can run cache pull with retries since we tend to see
172174
# issues from time to time pulling from ecr
173175
$(CREATE_HOOK_FILES_PATTERN)-%: BUILD_ARCH=$(if $(findstring x86_64,$*),amd64,arm64)
174-
$(CREATE_HOOK_FILES_PATTERN)-%: $(LINUXKIT_CACHE_FILE) | populate-linuxkit-cache $$(ENABLE_DOCKER)
176+
$(CREATE_HOOK_FILES_PATTERN)-%: $(LINUXKIT_CACHE_FILE) | hook/cache/linuxkit/index.json $$(ENABLE_DOCKER)
175177
@source $(BUILD_LIB)/common.sh && build::common::use_go_version $(GOLANG_VERSION); \
176-
if [ -f $(REPO)/out/linuxkit-hook-default-$(BUILD_ARCH)/hook-cmdline ]; then echo "remove hook/out before continuing"; exit 1; fi; \
178+
if [ -f $(REPO)/out/linuxkit-hook-default-$(BUILD_ARCH)/hook-cmdline ]; then echo "rm -rf hook/out before continuing"; exit 1; fi; \
177179
cd $(REPO); \
178180
DEBUG=yes LINUXKIT_VERSION_DEFAULT=$(LINUXKIT_VERSION) HOOK_KERNEL_OCI_BASE=$(IMAGE_REPO)/$(KERNEL_IMAGE_COMPONENT) \
179181
HOOK_LK_CONTAINERS_OCI_BASE=$(IMAGE_REPO)/tinkerbell/ \

0 commit comments

Comments
 (0)