osbuild-service-maintenance: Clean up expired images
This commit is contained in:
parent
742e0e6616
commit
c43ad2b22a
23 changed files with 899 additions and 32 deletions
|
|
@ -14,8 +14,8 @@ import (
|
|||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/service/ec2"
|
||||
|
||||
"github.com/osbuild/osbuild-composer/internal/cloud/awscloud"
|
||||
"github.com/osbuild/osbuild-composer/internal/common"
|
||||
"github.com/osbuild/osbuild-composer/internal/upload/awsupload"
|
||||
)
|
||||
|
||||
type awsCredentials struct {
|
||||
|
|
@ -91,7 +91,7 @@ func wrapErrorf(innerError error, format string, a ...interface{}) error {
|
|||
// The s3 key is never returned - the same thing is done in osbuild-composer,
|
||||
// the user has no way of getting the s3 key.
|
||||
func UploadImageToAWS(c *awsCredentials, imagePath string, imageName string) error {
|
||||
uploader, err := awsupload.New(c.Region, c.AccessKeyId, c.SecretAccessKey, c.sessionToken)
|
||||
uploader, err := awscloud.New(c.Region, c.AccessKeyId, c.SecretAccessKey, c.sessionToken)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot create aws uploader: %v", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue