upload/aws: fix architecture for aarch64 images

Previously, composer wrongly set x86_64 architecture even for aarch64 images.
This commit fixes it.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
Ondřej Budai 2020-11-26 12:27:28 +01:00 committed by msehnout
parent 9b2d565545
commit 4548923a09
4 changed files with 18 additions and 5 deletions

View file

@ -13,6 +13,7 @@ import (
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/osbuild/osbuild-composer/internal/common"
"github.com/osbuild/osbuild-composer/internal/upload/awsupload"
)
@ -97,7 +98,7 @@ func UploadImageToAWS(c *awsCredentials, imagePath string, imageName string) err
if err != nil {
return fmt.Errorf("cannot upload the image: %#v", err)
}
_, err = uploader.Register(imageName, c.Bucket, imageName, nil)
_, err = uploader.Register(imageName, c.Bucket, imageName, nil, common.CurrentArch())
if err != nil {
return fmt.Errorf("cannot register the image: %#v", err)
}