job: use image.raw.xz filename

RHEL and Fedora used different output formats (.ami vs .raw.xz). The job
package assumed `image.ami`, which failed for RHEL.

Change Fedora to use image.raw.xz as well. This makes it consistent, but
we should also get the filename from the distro at some point.
This commit is contained in:
Lars Karlitski 2019-11-29 18:22:08 +01:00 committed by Tom Gundersen
parent b53d897019
commit 1c5adfc682
5 changed files with 10 additions and 10 deletions

View file

@ -35,7 +35,7 @@ func New() *Fedora30 {
}
r.outputs["ami"] = output{
Name: "image.ami",
Name: "image.raw.xz",
MimeType: "application/octet-stream",
Packages: []string{
"@Core",
@ -58,7 +58,7 @@ func New() *Fedora30 {
},
KernelOptions: "ro no_timer_check console=ttyS0,115200n8 console=tty1 biosdevname=0 net.ifnames=0 console=ttyS0,115200",
IncludeFSTab: true,
Assembler: r.qemuAssembler("raw", "image.ami"),
Assembler: r.qemuAssembler("raw.xz", "image.raw.xz"),
}
r.outputs["ext4-filesystem"] = output{

View file

@ -39,7 +39,7 @@ func TestFilenameFromType(t *testing.T) {
{
name: "ami",
args: args{"ami"},
want: "image.ami",
want: "image.raw.xz",
want1: "application/octet-stream",
},
{

View file

@ -113,7 +113,7 @@ func (job *Job) Run(d distro.Distro) (error, []error) {
options.Key = job.ID.String()
}
_, err = a.Upload("/var/cache/osbuild-composer/store/refs/"+result.OutputID+"/image.ami", options.Bucket, options.Key)
_, err = a.Upload("/var/cache/osbuild-composer/store/refs/"+result.OutputID+"/image.raw.xz", options.Bucket, options.Key)
if err != nil {
r = append(r, err)
continue

View file

@ -1,7 +1,7 @@
{
"compose": {
"distro": "fedora-30",
"filename": "image.ami",
"filename": "image.raw.xz",
"output-format": "ami",
"blueprint": {}
},
@ -118,8 +118,8 @@
"assembler": {
"name": "org.osbuild.qemu",
"options": {
"format": "raw",
"filename": "image.ami",
"format": "raw.xz",
"filename": "image.raw.xz",
"ptuuid": "0x14fc63d2",
"root_fs_uuid": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
"size": 3222274048

View file

@ -1,7 +1,7 @@
{
"boot-test": {
"output-format": "ami",
"filename": "image.ami",
"filename": "image.raw.xz",
"boot-type": "qemu",
"blueprint": {
"name": "ami-boot-test",
@ -160,8 +160,8 @@
"assembler": {
"name": "org.osbuild.qemu",
"options": {
"format": "raw",
"filename": "image.ami",
"format": "raw.xz",
"filename": "image.raw.xz",
"ptuuid": "0x14fc63d2",
"root_fs_uuid": "76a22bf4-f153-4541-b6c7-0332c0dfaeac",
"size": 3222274048