Koji: expose boot mode in image extra metadata
Also extend the Koji test case to verify that the boot mode information is in the build extra metadata and that it contains valid value. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
0a5c82086a
commit
4ac6a7a11d
5 changed files with 27 additions and 5 deletions
|
|
@ -23,6 +23,7 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/rpmmd"
|
||||
"github.com/osbuild/osbuild-composer/internal/upload/koji"
|
||||
)
|
||||
|
|
@ -180,7 +181,8 @@ func TestKojiImport(t *testing.T) {
|
|||
RPMs: []rpmmd.RPM{},
|
||||
Extra: koji.BuildOutputExtra{
|
||||
Image: koji.ImageExtraInfo{
|
||||
Arch: "noarch",
|
||||
Arch: "noarch",
|
||||
BootMode: distro.BOOT_LEGACY.String(),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/rpmmd"
|
||||
"github.com/osbuild/osbuild-composer/internal/upload/koji"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
|
@ -99,7 +100,8 @@ func main() {
|
|||
RPMs: []rpmmd.RPM{},
|
||||
Extra: koji.BuildOutputExtra{
|
||||
Image: koji.ImageExtraInfo{
|
||||
Arch: arch,
|
||||
Arch: arch,
|
||||
BootMode: distro.BOOT_NONE.String(), // TODO: put the correct boot mode here
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -184,7 +184,8 @@ func (impl *KojiFinalizeJobImpl) Run(job worker.Job) error {
|
|||
imageRPMs = rpmmd.DeduplicateRPMs(imageRPMs)
|
||||
|
||||
imgOutputExtraInfo := koji.ImageExtraInfo{
|
||||
Arch: buildArgs.Arch,
|
||||
Arch: buildArgs.Arch,
|
||||
BootMode: buildArgs.ImageBootMode,
|
||||
}
|
||||
imgOutputsExtraInfo[args.KojiFilenames[i]] = imgOutputExtraInfo
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue