From fa1e8a374aafa705d05dc69c791016d3ffc9e3b3 Mon Sep 17 00:00:00 2001 From: Camila Macedo <7708031+camilamacedo86@users.noreply.github.com> Date: Thu, 30 Jan 2025 18:57:24 +0000 Subject: [PATCH] fix install script and release to use and provide default-catalog (#1675) --- .goreleaser.yml | 1 + Makefile | 6 ++++-- scripts/install.tpl.sh | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index d8c5d1a64..d828849dd 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -124,6 +124,7 @@ release: disable: '{{ ne .Env.ENABLE_RELEASE_PIPELINE "true" }}' extra_files: - glob: 'operator-controller.yaml' + - glob: './catalogd/config/base/default/clustercatalogs/default-catalogs.yaml' - glob: 'install.sh' header: | ## Installation diff --git a/Makefile b/Makefile index 8b7e90f84..5625d8696 100644 --- a/Makefile +++ b/Makefile @@ -248,9 +248,10 @@ kind-load: $(KIND) #EXHELP Loads the currently constructed images into the KIND .PHONY: kind-deploy kind-deploy: export MANIFEST := ./operator-controller.yaml +kind-deploy: export DEFAULT_CATALOG := ./catalogd/config/base/default/clustercatalogs/default-catalogs.yaml kind-deploy: manifests $(KUSTOMIZE) ($(KUSTOMIZE) build $(KUSTOMIZE_BUILD_DIR) && echo "---" && $(KUSTOMIZE) build catalogd/config/overlays/cert-manager | sed "s/cert-git-version/cert-$(VERSION)/g") > $(MANIFEST) - envsubst '$$CERT_MGR_VERSION,$$INSTALL_DEFAULT_CATALOGS,$$MANIFEST' < scripts/install.tpl.sh | bash -s + envsubst '$$DEFAULT_CATALOG,$$CERT_MGR_VERSION,$$INSTALL_DEFAULT_CATALOGS,$$MANIFEST' < scripts/install.tpl.sh | bash -s .PHONY: kind-cluster @@ -329,9 +330,10 @@ release: $(GORELEASER) #EXHELP Runs goreleaser for the operator-controller. By d .PHONY: quickstart quickstart: export MANIFEST := https://github.com/operator-framework/operator-controller/releases/download/$(VERSION)/operator-controller.yaml +quickstart: export DEFAULT_CATALOG := "https://github.com/operator-framework/operator-controller/releases/download/$(VERSION)/default-catalogs.yaml" quickstart: $(KUSTOMIZE) manifests #EXHELP Generate the unified installation release manifests and scripts. ($(KUSTOMIZE) build $(KUSTOMIZE_BUILD_DIR) && echo "---" && $(KUSTOMIZE) build catalogd/config/overlays/cert-manager) | sed "s/cert-git-version/cert-$(VERSION)/g" | sed "s/:devel/:$(VERSION)/g" > operator-controller.yaml - envsubst '$$CERT_MGR_VERSION,$$INSTALL_DEFAULT_CATALOGS,$$MANIFEST' < scripts/install.tpl.sh > install.sh + envsubst '$$DEFAULT_CATALOG,$$CERT_MGR_VERSION,$$INSTALL_DEFAULT_CATALOGS,$$MANIFEST' < scripts/install.tpl.sh > install.sh ##@ Docs diff --git a/scripts/install.tpl.sh b/scripts/install.tpl.sh index 705a9d88b..0138baade 100644 --- a/scripts/install.tpl.sh +++ b/scripts/install.tpl.sh @@ -9,7 +9,7 @@ if [[ -z "$olmv1_manifest" ]]; then exit 1 fi -default_catalogs_manifest="./catalogd/config/base/default/clustercatalogs/default-catalogs.yaml" +default_catalogs_manifest=$DEFAULT_CATALOG cert_mgr_version=$CERT_MGR_VERSION install_default_catalogs=$INSTALL_DEFAULT_CATALOGS