Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxesn committed Nov 7, 2024
1 parent de0a3aa commit 9ad7bbf
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions projects/tinkerbell/hook/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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/ \
Expand Down

0 comments on commit 9ad7bbf

Please sign in to comment.