From 18193e02cfed118a64c60769ac7593ba1a9ada58 Mon Sep 17 00:00:00 2001 From: dd di cesare Date: Wed, 6 Nov 2024 14:39:49 +0100 Subject: [PATCH] [opm] Unifying opm tool and catalog dockerfile version and arch Signed-off-by: dd di cesare --- .github/workflows/build-images.yaml | 4 ++-- Makefile | 7 ++++--- make/catalog.mk | 8 +------- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-images.yaml b/.github/workflows/build-images.yaml index c6b5493..e6f46a1 100644 --- a/.github/workflows/build-images.yaml +++ b/.github/workflows/build-images.yaml @@ -288,7 +288,7 @@ jobs: IMAGE_TAG=${{ github.sha }} \ AUTHORINO_VERSION=${{ env.LATEST_AUTHORINO_GITREF }} \ CHANNELS=${{ inputs.channels }} \ - CATALOG_ARCH=${{ matrix.arch }} + ARCH=${{ matrix.arch }} - name: Run make catalog (release) if: ${{ github.ref_name != env.MAIN_BRANCH_NAME }} run: | @@ -297,7 +297,7 @@ jobs: VERSION=${{ env.VERSION }} \ AUTHORINO_VERSION=${{ github.event.inputs.authorinoVersion }} \ CHANNELS=${{ inputs.channels }} \ - CATALOG_ARCH=${{ matrix.arch }} + ARCH=${{ matrix.arch }} - name: Git diff run: git diff - name: Build Image diff --git a/Makefile b/Makefile index 94f30a2..49bee5c 100644 --- a/Makefile +++ b/Makefile @@ -138,14 +138,15 @@ $(YQ): .PHONY: yq yq: $(YQ) ## Download yq locally if necessary. +ARCH ?= $(shell go env GOARCH) OPM = $(PROJECT_DIR)/bin/opm -OPM_VERSION = v1.26.2 +OPM_VERSION = 1.28.0 $(OPM): @{ \ set -e ;\ mkdir -p $(dir $(OPM)) ;\ - OS=$(shell go env GOOS) && ARCH=$(shell go env GOARCH) && \ - curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/$(OPM_VERSION)/$${OS}-$${ARCH}-opm ;\ + OS=$(shell go env GOOS) && \ + curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v$(OPM_VERSION)/$${OS}-$${ARCH}-opm ;\ chmod +x $(OPM) ;\ } diff --git a/make/catalog.mk b/make/catalog.mk index db28e55..59377e1 100644 --- a/make/catalog.mk +++ b/make/catalog.mk @@ -3,13 +3,7 @@ # The image tag given to the resulting catalog image (e.g. make catalog-build CATALOG_IMG=example.com/operator-catalog:v0.2.0). CATALOG_IMG ?= $(IMAGE_TAG_BASE)-catalog:$(IMAGE_TAG) -OPM_DOCKERFILE_VERSION ?= 1.28.0 - -ifeq ($(origin CATALOG_ARCH),undefined) -OPM_DOCKERFILE_TAG = latest -else -OPM_DOCKERFILE_TAG = v$(OPM_DOCKERFILE_VERSION)-$(CATALOG_ARCH) -endif +OPM_DOCKERFILE_TAG ?= v$(OPM_VERSION)-$(ARCH) CATALOG_FILE = $(PROJECT_DIR)/catalog/authorino-operator-catalog/operator.yaml CATALOG_DOCKERFILE = $(PROJECT_DIR)/catalog/authorino-operator-catalog.Dockerfile