Skip to content

Commit

Permalink
Enable DEV=y build support on HV=kubevirt
Browse files Browse the repository at this point in the history
Use correct build yml for pillar so that image is
built with -dev suffix.

Signed-off-by: Andrew Durbin <[email protected]>
  • Loading branch information
andrewd-zededa authored and eriknordmark committed Jul 23, 2024
1 parent 6972a16 commit af68942
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1013,13 +1013,14 @@ endif
# If DEV=y and file pkg/my_package/build-dev.yml exists, returns the path to that file.
# If RSTATS=y and file pkg/my_package/build-rstats.yml exists, returns the path to that file.
# If HV=kubevirt and file pkg/my_package/build-kubevirt.yml exists, returns the path to that file.
# Ortherwise returns pkg/my_package/build.yml.
# Otherwise returns pkg/my_package/build.yml.
get_pkg_build_yml = $(if $(filter kubevirt,$(HV)), $(call get_pkg_build_kubevirt_yml,$1), \
$(if $(filter y,$(RSTATS)), $(call get_pkg_build_rstats_yml,$1), \
$(if $(filter y,$(DEV)), $(call get_pkg_build_dev_yml,$1), build.yml)))
get_pkg_build_dev_yml = $(if $(wildcard pkg/$1/build-dev.yml),build-dev.yml,build.yml)
get_pkg_build_rstats_yml = $(if $(wildcard pkg/$1/build-rstats.yml),build-rstats.yml,build.yml)
get_pkg_build_kubevirt_yml = $(if $(wildcard pkg/$1/build-kubevirt.yml),build-kubevirt.yml,build.yml)
get_pkg_build_kubevirt_yml = $(if $($(DEV),y),build-kubevirt-dev.yml, \
$(if $(wildcard pkg/$1/build-kubevirt.yml),build-kubevirt.yml,build.yml))

eve-%: pkg/%/Dockerfile build-tools $(RESCAN_DEPS)
$(QUIET): "$@: Begin: LINUXKIT_PKG_TARGET=$(LINUXKIT_PKG_TARGET)"
Expand Down
31 changes: 31 additions & 0 deletions pkg/pillar/build-kubevirt-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# linuxkit build template
#
# Copyright (c) 2024 Zededa, Inc.
# SPDX-License-Identifier: Apache-2.0

---
org: lfedge
image: eve-pillar-dev
config:
binds:
- /lib/modules:/lib/modules
- /dev:/dev
- /etc/resolv.conf:/etc/resolv.conf
- /run:/run
- /config:/config
- /:/hostfs
- /persist:/persist:rshared,rbind
- /usr/bin/containerd:/usr/bin/containerd
net: host
capabilities:
- all
pid: host
rootfsPropagation: shared
devices:
- path: all
type: a
security_opt:
- seccomp:unconfined
buildArgs:
- HV=kubevirt
- DEV=y

0 comments on commit af68942

Please sign in to comment.