Skip to content

Commit 3c98fb5

Browse files
committed
make: fix go_preflight_ldflags and helm_values_mutation_function
1 parent d2e2b6a commit 3c98fb5

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

make/00_mod.mk

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ go_preflight_mod_dir := .
1313
go_preflight_ldflags := \
1414
-X $(repo_name)/pkg/version.PreflightVersion=$(VERSION) \
1515
-X $(repo_name)/pkg/version.Commit=$(GITCOMMIT) \
16-
-X $(repo_name)/pkg/version.BuildDate="$$(date -uR)" \
17-
-X $(repo_name)/pkg/client.ClientID="k3TrDbfLhCgnpAbOiiT2kIE1AbovKzjo" \
18-
-X $(repo_name)/pkg/client.ClientSecret="f39w_3KT9Vp0VhzcPzvh-uVbudzqCFmHER3Huj0dvHgJwVrjxsoOQPIw_1SDiCfa" \
19-
-X $(repo_name)/pkg/client.AuthServerDomain="auth.jetstack.io"
16+
-X $(repo_name)/pkg/version.BuildDate=$(shell date "+%F-%T-%Z") \
17+
-X $(repo_name)/pkg/client.ClientID=k3TrDbfLhCgnpAbOiiT2kIE1AbovKzjo \
18+
-X $(repo_name)/pkg/client.ClientSecret=f39w_3KT9Vp0VhzcPzvh-uVbudzqCFmHER3Huj0dvHgJwVrjxsoOQPIw_1SDiCfa \
19+
-X $(repo_name)/pkg/client.AuthServerDomain=auth.jetstack.io
2020

2121
oci_preflight_base_image_flavor := static
2222
oci_preflight_image_name := quay.io/jetstack/venafi-agent
@@ -26,6 +26,7 @@ oci_preflight_image_name_development := jetstack.local/venafi-agent
2626
deploy_name := venafi-kubernetes-agent
2727
deploy_namespace := venafi
2828

29+
helm_chart_repo_base := oci://registry.venafi.cloud/charts
2930
helm_chart_source_dir := deploy/charts/venafi-kubernetes-agent
3031
helm_chart_name := venafi-kubernetes-agent
3132
helm_chart_version := $(VERSION:v%=%)
@@ -34,13 +35,13 @@ helm_docs_use_helm_tool := 1
3435
helm_generate_schema := 1
3536
helm_verify_values := 1
3637

37-
golangci_lint_config := .golangci.yaml
38-
39-
define helm_values_mutation_function
40-
$(YQ) \
38+
# Allows us to replace the Helm values.yaml's image.repository and image.tag
39+
# with the right values. We use "=" and not ":=" because $(YQ) isn't defined yet
40+
# in 00_mod.mk, so we need this var to be lazy.
41+
helm_values_mutation_function = $(YQ) \
4142
'( .image.repository = "$(oci_preflight_image_name)" ) | \
4243
( .image.tag = "$(oci_preflight_image_tag)" )' \
4344
$1 --inplace
44-
endef
4545

46+
golangci_lint_config := .golangci.yaml
4647
go_header_file := /dev/null

make/02_mod.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ GITHUB_OUTPUT ?= /dev/stderr
66
## @category [shared] Release
77
release: $(helm_chart_archive)
88
$(MAKE) oci-push-preflight
9+
$(HELM) push "$(helm_chart_archive)" "$(helm_chart_repo_base)"
910

1011
@echo "RELEASE_OCI_preflight_IMAGE=$(oci_preflight_image_name)" >> "$(GITHUB_OUTPUT)"
1112
@echo "RELEASE_OCI_preflight_TAG=$(oci_preflight_image_tag)" >> "$(GITHUB_OUTPUT)"
@@ -42,3 +43,4 @@ $(helm_chart_source_dir)/templates/venafi-connection-crd.yaml: $(helm_chart_sour
4243
# "generate". Let's replace it with "generate-crds-venconn".
4344
shared_generate_targets := $(filter-out generate-crds,$(shared_generate_targets))
4445
shared_generate_targets += generate-crds-venconn
46+

0 commit comments

Comments
 (0)