From 2141928c35a7ad2dd4ab459f69bfe532ceb2fd7e Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Thu, 25 Jan 2024 17:47:55 +0100 Subject: [PATCH] =?UTF-8?q?Use=20released=20catalog-cd=20instead=20of=20do?= =?UTF-8?q?ing=20go=20run=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … it should be way quicker. Signed-off-by: Vincent Demeester --- .gitignore | 1 + Makefile | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index df70e69..7149b54 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /.env +/.git /.vscode/ /*.tgz diff --git a/Makefile b/Makefile index 5b49a0d..e0aed1e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ SHELL := /usr/bin/env bash +BIN = $(CURDIR)/.bin OSP_VERSION ?= latest @@ -10,6 +11,8 @@ RELEASE_VERSION = v$(CHART_VERSION) # release directory where the Tekton resources are rendered into. RELEASE_DIR ?= /tmp/$(CHART_NAME)-$(CHART_VERSION) +CATALOGCD_VERSION = v0.1.0 + # bats entry point and default flags BATS_CORE = ./test/.bats/bats-core/bin/bats BATS_FLAGS ?= --print-output-on-failure --show-output-of-passing-tests --verbose-run @@ -35,6 +38,14 @@ define render-template @helm template $(ARGS) $(CHART_NAME) . endef +$(BIN): + @mkdir -p $@ + +CATALOGCD = $(or ${CATALOGCD_BIN},${CATALOGCD_BIN},$(BIN)/catalog-cd) +$(BIN)/catalog-cd: $(BIN) + curl -fsL https://github.com/openshift-pipelines/catalog-cd/releases/download/v0.1.0/catalog-cd_0.1.0_linux_x86_64.tar.gz | tar xzf - -C $(BIN) catalog-cd + + # renders the task resource file printing it out on the standard output helm-template: $(call render-template) @@ -52,8 +63,7 @@ prepare-release: .PHONY: release release: prepare-release pushd ${RELEASE_DIR} && \ - go run github.com/openshift-pipelines/tektoncd-catalog/cmd/catalog-cd@main \ - release \ + $(CATALOGCD) release \ --output release \ --version $(CHART_VERSION) \ tasks/* \