Skip to content

Commit

Permalink
[opm] Unifying opm tool and catalog dockerfile version and arch
Browse files Browse the repository at this point in the history
Signed-off-by: dd di cesare <[email protected]>
  • Loading branch information
didierofrivia committed Nov 6, 2024
1 parent fca19af commit 18193e0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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) ;\
}

Expand Down
8 changes: 1 addition & 7 deletions make/catalog.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 18193e0

Please sign in to comment.