Skip to content

Commit

Permalink
Prefer docker over podman in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jotak committed May 24, 2023
1 parent 49c4ade commit c66e53d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ BUNDLE_IMAGE ?= $(IMAGE_TAG_BASE)-bundle:v$(BUNDLE_VERSION)

# Image URL to use all building/pushing image targets
IMAGE ?= $(IMAGE_TAG_BASE):$(VERSION)
IMAGE_SHA = $(IMAGE_TAG_BASE):$(BUILD_SHA)
OCI_BUILD_OPTS ?=
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false"
Expand All @@ -91,8 +90,8 @@ else
GOBIN=$(shell go env GOBIN)
endif

# Image building tool (docker / podman)
OCI_BIN_PATH := $(shell which podman || which docker)
# Image building tool (docker / podman) - docker is preferred in CI
OCI_BIN_PATH := $(shell which docker || which podman)
OCI_BIN ?= $(shell basename ${OCI_BIN_PATH})

DATE=$(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
Expand Down
13 changes: 12 additions & 1 deletion hack/test-workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,19 @@ run_step() {
opts=$4

version=$(cat .github/workflows/$file | yq ".env.WF_VERSION")
if [[ $version == '${{ github.ref_name }}' ]]; then
version=main
fi
step=$(cat .github/workflows/$file | yq ".jobs.$job.steps[] | select(.name==\"$name\").run")
step=$(echo "$step" | sed -r "s~\\$\{\{ env\.WF_ORG \}\}~netobserv~g" | sed -r "s~\\$\{\{ env\.WF_VERSION \}\}~$version~g" | sed -r "s~\\$\{\{ env\.WF_REGISTRY \}\}~quay.io/netobserv~g" | sed -r "s~\\$\{\{ env\.WF_IMAGE \}\}~network-observability-operator~g" | sed -r "s~\\$\{\{ env\.WF_MULTIARCH_TARGETS \}\}~amd64 arm64 ppc64le~g" | sed -r "s~\\$\{\{ env\.short_sha \}\}~$short_sha~g" | sed -r "s~\\$\{\{ env\.tag \}\}~$fake_tag~g")
step=$(echo "$step" \
| sed -r "s~\\$\{\{ env\.WF_ORG \}\}~netobserv~g" \
| sed -r "s~\\$\{\{ env\.WF_VERSION \}\}~$version~g" \
| sed -r "s~\\$\{\{ env\.WF_REGISTRY \}\}~quay.io/netobserv~g" \
| sed -r "s~\\$\{\{ env\.WF_IMAGE \}\}~network-observability-operator~g" \
| sed -r "s~\\$\{\{ env\.WF_MULTIARCH_TARGETS \}\}~amd64 arm64 ppc64le~g" \
| sed -r "s~\\$\{\{ env\.short_sha \}\}~$short_sha~g" \
| sed -r "s~\\$\{\{ env\.tag \}\}~$fake_tag~g" \
)
step="$opts $step"

echo "↘️ Running step '$name' ($file)"
Expand Down

0 comments on commit c66e53d

Please sign in to comment.