Skip to content

Commit

Permalink
WIP: Pull the latest kata-agent from cache
Browse files Browse the repository at this point in the history
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
  • Loading branch information
stevenhorsman committed Mar 26, 2024
1 parent 3be543a commit bcf9d39
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/cloud-api-adaptor/podvm/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ $(PROCESS_USER_DATA): always
cd "$(ROOT_DIR)" && ARCH=$(DEB_ARCH) $(MAKE) process-user-data
install -D --compare "$(ROOT_DIR)/process-user-data" "$@"

$(KATA_AGENT): $(FORCE_TARGET) | $(STATIC_LIBSECCOMP)
cd "$(KATA_AGENT_SRC)" && $(RUST_FLAGS) $(MAKE) BUILD_TYPE=$(KATA_AGENT_BUILD_TYPE) SEALED_SECRET=${SEALED_SECRET} AGENT_POLICY=${AGENT_POLICY} LIBSECCOMP_LINK_TYPE=static LIBSECCOMP_LIB_PATH=$(dir $(STATIC_LIBSECCOMP))
install -D --compare "$(KATA_AGENT_SRC)/target/$(RUST_TARGET)/$(KATA_AGENT_BUILD_TYPE)/$(@F)" "$@"
$(KATA_AGENT): $(FORCE_TARGET)
# WIP - just support cached binary from kata ghcr registry currently and only the latest main
oras pull ghcr.io/kata-containers/cached-artefacts/agent-opa:latest-main-$(ARCH)

$(STATIC_LIBSECCOMP): $(KATA_CONTAINERS_SRC)
$(RUST_FLAGS) $(STATIC_LIBSECCOMP_BUILDER) $(STATIC_LIBSECCOMP_DIR)/kata-libseccomp $(STATIC_LIBSECCOMP_DIR)/kata-gperf
Expand Down Expand Up @@ -168,6 +168,7 @@ $(GUEST_COMPONENTS_SRC):
$(call git_clone_repo_ref,$(GUEST_COMPONENTS_REPO),$(GUEST_COMPONENTS_SRC),$(GUEST_COMPONENTS_VERSION))

$(ATTESTATION_AGENT): $(FORCE_TARGET) | $(GUEST_COMPONENTS_SRC)
# TODO - use oras to get guest-components caches
cd "$(GUEST_COMPONENTS_SRC)/attestation-agent" && CC= ARCH=$(ARCH) $(MAKE) KBC="$(AA_KBC)" ttrpc=true LIBC="$(LIBC)"
mkdir -p "$(@D)"
install --compare "$(GUEST_COMPONENTS_SRC)/target/$(RUST_TARGET)/release/attestation-agent" "$@"
Expand Down Expand Up @@ -204,7 +205,7 @@ clean_sources:
[ -d "$(PAUSE_SRC)" ] && cd "$(PAUSE_SRC)" && rm -rf *
[ -d "$(UMOCI_SRC)" ] && cd "$(UMOCI_SRC)" && git clean -xfd -e umoci
[ -d "$(KATA_CONTAINERS_SRC)" ] && cd "$(KATA_CONTAINERS_SRC)" && git clean -xfd
[ -d "$(OPA_SRC)" ] && cd "$(OPA_SRC)" && git clean -xfd
[ -d "$(OPA_SRC)" ] && cd "$(OPA_SRC)" && git clean -xfd

.PHONY: force always
always force:

0 comments on commit bcf9d39

Please sign in to comment.