Skip to content

Commit

Permalink
osbuild-composer: add iot-bootable-container to weldr deny list
Browse files Browse the repository at this point in the history
We only want to build this image type in Fedora Koji.
  • Loading branch information
achilleas-k committed Jan 26, 2024
1 parent 096fe89 commit 1f5e09d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
5 changes: 5 additions & 0 deletions cmd/osbuild-composer/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ func GetDefaultConfig() *ComposerConfigFile {
"gce-rhui",
},
},
"fedora-*": {
ImageTypeDenyList: []string{
"iot-bootable-container",
},
},
},
},
DistroAliases: map[string]string{
Expand Down
11 changes: 9 additions & 2 deletions cmd/osbuild-composer/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ func TestDefaultConfig(t *testing.T) {
"gce-rhui",
},
},
"fedora-*": {
[]string{
"iot-bootable-container",
},
},
},
}

Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit 1f5e09d

Please sign in to comment.