From 15cd85657f1985d174f1bf2efbf851ebda556f7f Mon Sep 17 00:00:00 2001 From: reederc42 Date: Thu, 11 Apr 2024 07:38:48 -0700 Subject: [PATCH] Adds configurable helm chart version to Makefile --- BUILD.md | 12 ++++++++---- Makefile | 7 ++++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/BUILD.md b/BUILD.md index 21daab51d..1972f4c9d 100644 --- a/BUILD.md +++ b/BUILD.md @@ -6,13 +6,13 @@ * Docker-compatible container cli, such as nerdctl or docker * Make, if not building natively or with linker flags -* Go 1.19 or greater, to optionally build Trident natively +* Go 1.21 or greater, to optionally build Trident natively ### Multi-Platform * Make * Docker -* Go 1.19 or greater, to optionally build Trident binaries natively +* Go 1.21 or greater, to optionally build Trident binaries natively * jq ## Makefile Parameters @@ -32,7 +32,7 @@ Container registry used to tag images and manifests, and optionally to push imag `GO_IMAGE` -Default: `golang:1.19` +Default: `golang:1.21` Container image used by default `$GO_SHELL` to run binary build scripts. @@ -52,11 +52,15 @@ Default: `alpine/helm:3.6.1` Container image used by default `$HELM_CMD` to package helm chart. +`HELM_CHART_VERSION` + +If defined, overrides the default chart version + `DOCKER_CLI` Default: `docker` -docker-compatible cli, such as nerdctl or docker, used to run containers and tag single-platform images. +Docker-compatible cli, such as nerdctl or docker, used to run containers and tag single-platform images. `BUILD_CLI` diff --git a/Makefile b/Makefile index 9d2942dbd..2453691e3 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,9 @@ GOFLAGS ?= # HELM_IMAGE helm image used in default HELM_CMD HELM_IMAGE ?= alpine/helm:3.6.1 +# HELM_CHART_VERSION overrides the default chart version +HELM_CHART_VERSION ?= + # DOCKER_CLI the docker-compatible cli used to run and tag images DOCKER_CLI ?= docker @@ -363,7 +366,9 @@ operator_manifest: operator_images # packages helm chart chart: @cp README.md ./helm/trident-operator/ - @$(HELM_CMD) package ./helm/trident-operator $(if $(HELM_PGP_KEY),--sign --key "$(HELM_PGP_KEY)" --keyring "$(HELM_PGP_KEYRING)") + @$(HELM_CMD) package ./helm/trident-operator \ + $(if $(HELM_PGP_KEY),--sign --key "$(HELM_PGP_KEY)" --keyring "$(HELM_PGP_KEYRING)") \ + $(if $(HELM_CHART_VERSION),--version "$(HELM_CHART_VERSION)") @rm -f ./helm/trident-operator/README.md # builds installer bundle. Skips binaries that have not been built.