Skip to content

Commit

Permalink
ci: use profile instead of marker files
Browse files Browse the repository at this point in the history
more recent version of mkosi can use Profile & Architecture in matches
clauses.

Signed-off-by: Magnus Kulke <magnuskulke@microsoft.com>
  • Loading branch information
mkulke committed Jan 10, 2025
1 parent a23c773 commit e54d04d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 28 deletions.
6 changes: 0 additions & 6 deletions src/cloud-api-adaptor/podvm-mkosi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,12 @@ image:
rm -rf ./build
@echo "Building image..."
ifeq ($(SE_BOOT),true)
touch resources/buildS390xImage
sudo mkosi --profile production.conf --image system
sudo -E ../hack/build-s390x-se-image.sh
else ifeq ($(ARCH),s390x)
touch resources/buildS390xImage
sudo mkosi --profile production.conf --image system
sudo -E ../hack/build-s390x-image.sh
else
touch resources/buildBootableImage
mkosi --profile production.conf
qemu-img convert -f raw -O qcow2 build/system.raw build/podvm-$(PODVM_DISTRO)-$(ARCH).qcow2
endif
Expand All @@ -86,15 +83,12 @@ image-debug:
rm -rf ./build
@echo "Building debug image..."
ifeq ($(SE_BOOT),true)
touch resources/buildS390xImage
sudo mkosi --profile debug.conf
sudo -E ../hack/build-s390x-se-image.sh
else ifeq ($(ARCH),s390x)
touch resources/buildS390xImage
sudo mkosi --profile debug.conf
sudo -E ../hack/build-s390x-image.sh
else
touch resources/buildBootableImage
mkosi --profile debug.conf
qemu-img convert -f raw -O qcow2 build/system.raw build/podvm-$(PODVM_DISTRO)-$(ARCH).qcow2
endif
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
[Match]
Distribution=fedora

# mkosi version in nix is 17.1,
# which doesn't support Architecture in [Match]
# As a workaround, use a flag file instead.
#Architecture=!s390x
PathExists=../../resources/buildBootableImage
Architecture=!s390x

[Content]
Packages=systemd-boot
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
[Match]
Distribution=fedora

PathExists=../../resources/buildDebugImage

Profile=debug
# Overwrite default ssh config, but conflict with
# cloud-init which is installed for s390x.
#Architecture=!s390x
PathExists=../../resources/buildBootableImage
Architecture=!s390x

[Content]
ExtraTrees=../../mkosi.skeleton-debug
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[Match]
Distribution=fedora
# Only for debug images and if authorized_keys exists
PathExists=../../resources/buildDebugImage
Profile=debug
PathExists=../../resources/authorized_keys

[Content]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[Match]
Distribution=fedora
# This is a little hack to define different image types in a mkosi config.
# There is also imageId, but it renames the output, which is not what we want.
PathExists=../../resources/buildDebugImage
Profile=debug

[Content]
Autologin=true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
[Match]
Distribution=fedora

# mkosi version in nix is 17.1,
# which doesn't support Architecture in [Match]
# As a workaround, use a flag file instead.
#Architecture=s390x
PathExists=../../resources/buildS390xImage
Architecture=s390x

[Content]
Bootable=no
Expand Down

0 comments on commit e54d04d

Please sign in to comment.