Skip to content

Commit

Permalink
Merge pull request #1118 from mesosphere/dlipovetsky/release-2.9-podm…
Browse files Browse the repository at this point in the history
…an-4.x

fix: Make image load compatible with podman
  • Loading branch information
dlipovetsky authored Jul 10, 2024
2 parents 9e4c801 + 887f672 commit d2d0a6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/podman-aws-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ permissions:

jobs:
rune2e:
runs-on: ubuntu-22.04
# According to https://docs.d2iq.com/dkp/2.8/podman, podman >= 4.0.0 is required.
# The ubuntu-24.04 runner has podman 4.9.3 (as of https://github.com/actions/runner-images/pull/9828).
# The other ubuntu images have podman 3.x, so we cannot use them.
runs-on: ubuntu-24.04
continue-on-error: false
steps:
- name: Checkout konvoy-image-builder repository
Expand Down Expand Up @@ -55,9 +58,9 @@ jobs:
make build-for-podman
goreleaser build --config=.goreleaser-podman-e2e.yml --clean --skip-validate
- name: Run E2E test for AWS centos 7.9 using podman
- name: Run E2E test for AWS Rocky 9.1 using podman
run: |-
KIB_CONTAINER_ENGINE=podman dist/konvoy-image-wrapper-for-podman_linux_amd64_v1/konvoy-image build aws images/ami/centos-79.yaml --dry-run
KIB_CONTAINER_ENGINE=podman dist/konvoy-image-wrapper-for-podman_linux_amd64_v1/konvoy-image build aws images/ami/rocky-91.yaml --dry-run
env:
GITHUB_TOKEN: ${{ secrets.MESOSPHERECI_USER_TOKEN }}
KIB_CONTAINER_ENGINE: podman
10 changes: 0 additions & 10 deletions cmd/konvoy-image-wrapper/image/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,5 @@ func LoadImage(containerEngine string) error {
if err != nil {
return fmt.Errorf("failed to run cmd %s with error %w", cmd.Args, err)
}
if containerEngine != "podman" {
return nil
}
cmdTag := exec.Command(containerEngine, "tag", fmt.Sprintf("localhost/%s", image), fmt.Sprintf("docker.io/%s", image))
cmdTag.Stdout = os.Stdout
cmdTag.Stderr = os.Stderr
err = cmdTag.Run()
if err != nil {
return fmt.Errorf("failed to run cmd %s with error %w", cmd.Args, err)
}
return nil
}

0 comments on commit d2d0a6d

Please sign in to comment.