From 045b5618a69eb60d00ef33b0c462514c65899248 Mon Sep 17 00:00:00 2001 From: faiq Date: Mon, 16 Oct 2023 10:30:52 -0700 Subject: [PATCH] fix: push the image and copy modified commands to pull --- .github/workflows/podman-aws-e2e.yaml | 2 +- cmd/konvoy-image-wrapper/image/image_not_embedded.go | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/podman-aws-e2e.yaml b/.github/workflows/podman-aws-e2e.yaml index 3e6fc2be3..bab3b46bc 100644 --- a/.github/workflows/podman-aws-e2e.yaml +++ b/.github/workflows/podman-aws-e2e.yaml @@ -51,7 +51,7 @@ jobs: run: go install github.com/goreleaser/goreleaser@v1.15.2 - name: Build snapshot - run: make build.snapshot + run: make kib-image-push-amd64 - name: Run E2E test for AWS centos 7.9 using podman run: |- diff --git a/cmd/konvoy-image-wrapper/image/image_not_embedded.go b/cmd/konvoy-image-wrapper/image/image_not_embedded.go index b78bc26e6..bc886d2fd 100644 --- a/cmd/konvoy-image-wrapper/image/image_not_embedded.go +++ b/cmd/konvoy-image-wrapper/image/image_not_embedded.go @@ -4,6 +4,7 @@ package image import ( + "fmt" "os/exec" ) @@ -14,7 +15,12 @@ func LoadImage(containerEngine string) error { if imageLoaded(containerEngine, image) { return nil } + //nolint:gosec // this is necessary - cmd := exec.Command(containerEngine, "pull", Tag()) - return cmd.Run() + cmd := exec.Command(containerEngine, "pull", fmt.Sprintf("docker.io/%s", Tag())) + err := cmd.Run() + if err != nil { + return fmt.Errorf("failed to pull image %s using cmd %s with error %w", Tag(), cmd.Args, err) + } + return nil }