Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-create ECR registries before docker push #188

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
use logs
  • Loading branch information
nandajavarma committed Aug 27, 2024
commit 313c02e5ac3f2c1dcb08bd038d00ae711930de41
8 changes: 5 additions & 3 deletions pkg/leeway/images.go
Original file line number Diff line number Diff line change
@@ -6,6 +6,8 @@ import (
"fmt"
"strings"

log "github.com/sirupsen/logrus"

"os/exec"

"github.com/aws/aws-sdk-go-v2/aws"
@@ -45,7 +47,7 @@ func (e *ECRAdapter) Create(image string) error {
RepositoryName: aws.String(imageName),
})
if err == nil {
fmt.Printf("Image %s already exists\n", imageName)
log.Infof("image %s already exists\n", imageName)
return nil
}

@@ -60,7 +62,7 @@ func (e *ECRAdapter) Create(image string) error {
return fmt.Errorf("failed to create ECR image: %w", err)
}

fmt.Printf("Image %s created successfully\n", imageName)
log.Infof("image %s created successfully\n", imageName)
return nil
}

@@ -72,7 +74,7 @@ func (e *ECRAdapter) Sign(imageName, profileARN string) error {
return fmt.Errorf("failed to sign the image: %v, output: %s", err, string(output))
}

fmt.Printf("Image %s signed successfully\n", imageName)
log.Infof("image %s signed successfully\n", imageName)
return nil
}

Loading
Oops, something went wrong.