From a07663dd050ab3edf4b57d4434cf0c2a3e43e8be Mon Sep 17 00:00:00 2001 From: Nolan Brubaker Date: Thu, 12 Dec 2024 13:53:00 -0500 Subject: [PATCH] Add debugging information for test image upload Signed-off-by: Nolan Brubaker --- test/e2e/shared/aws.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/e2e/shared/aws.go b/test/e2e/shared/aws.go index 31a6ac283a..e0da929611 100644 --- a/test/e2e/shared/aws.go +++ b/test/e2e/shared/aws.go @@ -696,6 +696,7 @@ func ensureTestImageUploaded(e2eCtx *E2EContext) error { } imageSha := strings.ReplaceAll(strings.TrimSuffix(stdOut.String(), "\n"), "'", "") + fmt.Fprintf(GinkgoWriter, "got container SHA") ecrImageName := repoName + ":e2e" cmd = exec.Command("docker", "tag", imageSha, ecrImageName) //nolint:gosec @@ -704,6 +705,8 @@ func ensureTestImageUploaded(e2eCtx *E2EContext) error { return err } + fmt.Fprintf(GinkgoWriter, "tagged ECR image") + outToken, err := ecrSvc.GetAuthorizationToken(&ecrpublic.GetAuthorizationTokenInput{}) if err != nil { return err @@ -723,11 +726,14 @@ func ensureTestImageUploaded(e2eCtx *E2EContext) error { return err } + fmt.Fprintf(GinkgoWriter, "logged in to public.ecr.aws") + cmd = exec.Command("docker", "push", ecrImageName) err = cmd.Run() if err != nil { return err } + fmt.Fprintf(GinkgoWriter, "pushed e2e image %q", ecrImageName) e2eCtx.E2EConfig.Variables["CAPI_IMAGES_REGISTRY"] = repoName e2eCtx.E2EConfig.Variables["E2E_IMAGE_TAG"] = "e2e" return nil