From 2982694611837754f8ac6d2611f6d69216d6ad40 Mon Sep 17 00:00:00 2001 From: Adam Cattermole Date: Mon, 23 Oct 2023 10:17:49 +0100 Subject: [PATCH 1/3] Fix bundle build workflow (cherry picked from commit 35ef6553aeae7222c09fef749d9c6ce451683dad) --- .github/workflows/release.yaml | 1 + Makefile | 6 ++++-- bundle.Dockerfile | 3 ++- config/authorino/kustomization.template.yaml | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 45aad07c..76504e97 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -49,6 +49,7 @@ jobs: VERSION=${{ github.event.inputs.operatorVersion }} \ AUTHORINO_VERSION=${{ github.event.inputs.authorinoVersion }} \ CHANNELS=${{ github.event.inputs.channels }} \ + DEFAULT_CHANNEL=${{ github.event.inputs.channels }} \ make prepare-release - name: Commit and push run: | diff --git a/Makefile b/Makefile index cd4969ad..8e528252 100644 --- a/Makefile +++ b/Makefile @@ -77,8 +77,10 @@ SHELL = /usr/bin/env bash -o pipefail AUTHORINO_VERSION ?= latest ifeq (latest,$(AUTHORINO_VERSION)) AUTHORINO_BRANCH = main +AUTHORINO_IMAGE_TAG = latest else AUTHORINO_BRANCH = v$(AUTHORINO_VERSION) +AUTHORINO_IMAGE_TAG = v$(AUTHORINO_VERSION) endif AUTHORINO_IMAGE_FILE ?= authorino_image @@ -140,7 +142,7 @@ manifests: controller-gen kustomize authorino-manifests ## Generate WebhookConfi .PHONY: authorino-manifests authorino-manifests: export AUTHORINO_GITREF := $(AUTHORINO_BRANCH) -authorino-manifests: export AUTHORINO_VERSION := $(AUTHORINO_VERSION) +authorino-manifests: export AUTHORINO_IMAGE_TAG := $(AUTHORINO_IMAGE_TAG) authorino-manifests: ## Update authorino manifests. envsubst \ < config/authorino/kustomization.template.yaml \ @@ -266,7 +268,7 @@ prepare-release: @if [ "$(AUTHORINO_VERSION)" = "latest" ]; then\ [ ! -e "$(AUTHORINO_IMAGE_FILE)" ] || rm $(AUTHORINO_IMAGE_FILE); \ else \ - echo quay.io/kuadrant/authorino:v$(AUTHORINO_VERSION) > $(AUTHORINO_IMAGE_FILE); \ + echo quay.io/kuadrant/authorino:$(AUTHORINO_IMAGE_TAG) > $(AUTHORINO_IMAGE_FILE); \ fi $(MAKE) fix-csv-replaces diff --git a/bundle.Dockerfile b/bundle.Dockerfile index 8fe9a64b..289359d2 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -5,7 +5,8 @@ LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ LABEL operators.operatorframework.io.bundle.package.v1=authorino-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha +LABEL operators.operatorframework.io.bundle.channels.v1=stable +LABEL operators.operatorframework.io.bundle.channel.default.v1=stable LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.22.0 LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 diff --git a/config/authorino/kustomization.template.yaml b/config/authorino/kustomization.template.yaml index d08e0c40..37f905be 100644 --- a/config/authorino/kustomization.template.yaml +++ b/config/authorino/kustomization.template.yaml @@ -9,7 +9,7 @@ resources: images: - name: AUTHORINO_IMAGE newName: quay.io/kuadrant/authorino - newTag: ${AUTHORINO_VERSION} + newTag: ${AUTHORINO_IMAGE_TAG} patchesStrategicMerge: - webhook/patches/webhook_in_authconfigs.yaml From e370b8ff4a74c08b8aefee954ae354cc05c853d9 Mon Sep 17 00:00:00 2001 From: Adam Cattermole Date: Mon, 23 Oct 2023 14:27:31 +0100 Subject: [PATCH 2/3] Update release workflow to commit authorino_image file --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 76504e97..7d445dc3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -55,7 +55,7 @@ jobs: run: | git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" - git commit -m "Prepared release v${{ github.event.inputs.operatorVersion }}" -a + git add -A && git commit -m "Prepared release v${{ github.event.inputs.operatorVersion }}" git push origin release-v${{ github.event.inputs.operatorVersion }} - name: Create release uses: softprops/action-gh-release@v1 From f5ff784bb993360d1d22cd2151f210e12ff446c3 Mon Sep 17 00:00:00 2001 From: Adam Cattermole Date: Tue, 24 Oct 2023 10:59:16 +0100 Subject: [PATCH 3/3] Reset bundle channel to alpha --- bundle.Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bundle.Dockerfile b/bundle.Dockerfile index 289359d2..8fe9a64b 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -5,8 +5,7 @@ LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ LABEL operators.operatorframework.io.bundle.package.v1=authorino-operator -LABEL operators.operatorframework.io.bundle.channels.v1=stable -LABEL operators.operatorframework.io.bundle.channel.default.v1=stable +LABEL operators.operatorframework.io.bundle.channels.v1=alpha LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.22.0 LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3