From c66e53d7e5fb83054d47c8134ba62fe890841c19 Mon Sep 17 00:00:00 2001 From: Joel Takvorian Date: Wed, 24 May 2023 15:10:54 +0200 Subject: [PATCH] Prefer docker over podman in CI --- Makefile | 5 ++--- hack/test-workflow.sh | 13 ++++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 808d8cd68..ff8523ff5 100644 --- a/Makefile +++ b/Makefile @@ -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" @@ -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") diff --git a/hack/test-workflow.sh b/hack/test-workflow.sh index d9e23411d..05a550aa0 100755 --- a/hack/test-workflow.sh +++ b/hack/test-workflow.sh @@ -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)"