Skip to content

Commit

Permalink
Change docker commands into podman
Browse files Browse the repository at this point in the history
Signed-off-by: Ondrej Pokorny <opokorny@redhat.com>
  • Loading branch information
opokornyy committed Apr 19, 2022
1 parent 1ac524e commit 138a465
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

- name: Publish operator image and generate release assets
run: |
docker login -u="${{ secrets.QUAY_BOT }}" -p="${{ secrets.QUAY_PASSWORD }}" quay.io
podman login -u="${{ secrets.QUAY_BOT }}" -p="${{ secrets.QUAY_PASSWORD }}" quay.io
export IMG_TAG="${{ steps.get_release.outputs.tag_name }}"
export VALIDATOR_IMG_TAG="${{ steps.get_release.outputs.tag_name }}"
export VERSION="`echo ${{ steps.get_release.outputs.tag_name }} | sed 's/^v//'`"
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ container-build: unittest bundle
mkdir -p data/crd
cp bundle/manifests/ssp-operator.clusterserviceversion.yaml data/olm-catalog/ssp-operator.clusterserviceversion.yaml
cp bundle/manifests/ssp.kubevirt.io_ssps.yaml data/crd/ssp.kubevirt.io_ssps.yaml
docker build -t ${IMG} \
podman build -t ${IMG} \
--build-arg IMG_REPOSITORY=${IMG_REPOSITORY} \
--build-arg IMG_TAG=${IMG_TAG} \
--build-arg IMG=${IMG} \
Expand All @@ -155,13 +155,13 @@ container-build: unittest bundle

# Push the container image
container-push:
docker push ${IMG}
podman push ${IMG}

build-template-validator:
./hack/build-template-validator.sh ${VERSION}

build-template-validator-container:
docker build -t ${VALIDATOR_IMG} \
podman build -t ${VALIDATOR_IMG} \
--build-arg IMG_REPOSITORY=${IMG_REPOSITORY} \
--build-arg IMG_TAG=${IMG_TAG} \
--build-arg IMG=${IMG} \
Expand All @@ -171,7 +171,7 @@ build-template-validator-container:
. -f validator.Dockerfile

push-template-validator-container:
docker push ${VALIDATOR_IMG}
podman push ${VALIDATOR_IMG}

# Download controller-gen locally if necessary
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
Expand Down Expand Up @@ -226,7 +226,7 @@ bundle: operator-sdk manifests kustomize csv-generator manager-envsubst
# Build the bundle image.
.PHONY: bundle-build
bundle-build:
docker build -f bundle.Dockerfile -t $(BUNDLE_IMG) .
podman build -f bundle.Dockerfile -t $(BUNDLE_IMG) .

.PHONY: release
release: container-build container-push build-template-validator-container push-template-validator-container bundle build-functests
Expand Down
5 changes: 1 addition & 4 deletions hack/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ if [ -z ${KUBEVIRT_CRI} ]; then
if podman ps >/dev/null; then
KUBEVIRT_CRI=podman
echo "selecting podman as container runtime"
elif docker ps >/dev/null; then
KUBEVIRT_CRI=docker
echo "selecting docker as container runtime"
else
echo "no working container runtime found. Neither docker nor podman seems to work."
echo "no working container runtime found. Podman seems not to work."
exit 1
fi
fi
4 changes: 2 additions & 2 deletions tests/e2e-test-csv-generator.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

olm_output=$(docker run --rm --entrypoint=/csv-generator quay.io/kubevirt/ssp-operator:latest \
olm_output=$(podman run --rm --entrypoint=/csv-generator quay.io/kubevirt/ssp-operator:latest \
--csv-version=9.9.9 --namespace=namespace-test --operator-version=8.8.8 --validator-image=validator-test --dump-crds \
--operator-image=operator-test)

Expand Down Expand Up @@ -30,7 +30,7 @@ if [ $(echo $olm_output | grep 'group: ssp.kubevirt.io'| wc -l) -eq 0 ]; then
fi

#test the case without --dump-crds flag
olm_output=$(docker run --rm --entrypoint=/csv-generator quay.io/kubevirt/ssp-operator:latest \
olm_output=$(podman run --rm --entrypoint=/csv-generator quay.io/kubevirt/ssp-operator:latest \
--csv-version=9.9.9 --namespace=namespace-test --operator-version=8.8.8 --validator-image=validator-test \
--operator-image=operator-test)

Expand Down

0 comments on commit 138a465

Please sign in to comment.