From 1f5e09d877aa795460442e67bc2966b57eb44ac3 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Fri, 26 Jan 2024 14:45:00 +0100 Subject: [PATCH] osbuild-composer: add iot-bootable-container to weldr deny list We only want to build this image type in Fedora Koji. --- cmd/osbuild-composer/config.go | 5 +++++ cmd/osbuild-composer/config_test.go | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/cmd/osbuild-composer/config.go b/cmd/osbuild-composer/config.go index d89dea58c22..4887534e4f9 100644 --- a/cmd/osbuild-composer/config.go +++ b/cmd/osbuild-composer/config.go @@ -111,6 +111,11 @@ func GetDefaultConfig() *ComposerConfigFile { "gce-rhui", }, }, + "fedora-*": { + ImageTypeDenyList: []string{ + "iot-bootable-container", + }, + }, }, }, DistroAliases: map[string]string{ diff --git a/cmd/osbuild-composer/config_test.go b/cmd/osbuild-composer/config_test.go index 009cd11298f..1c4fe2bcf1e 100644 --- a/cmd/osbuild-composer/config_test.go +++ b/cmd/osbuild-composer/config_test.go @@ -57,6 +57,11 @@ func TestDefaultConfig(t *testing.T) { "gce-rhui", }, }, + "fedora-*": { + []string{ + "iot-bootable-container", + }, + }, }, } @@ -113,9 +118,11 @@ func TestWeldrDistrosImageTypeDenyList(t *testing.T) { require.NoError(t, err) require.NotNil(t, config) + // rhel config is overridden, but fedora is unaffected expectedWeldrDistrosImageTypeDenyList := map[string][]string{ - "*": {"qcow2", "vmdk"}, - "rhel-84": {"qcow2"}, + "*": {"qcow2", "vmdk"}, + "fedora-*": {"iot-bootable-container"}, + "rhel-84": {"qcow2"}, } require.Equal(t, expectedWeldrDistrosImageTypeDenyList, config.weldrDistrosImageTypeDenyList())