Skip to content

Commit 68d1dc9

Browse files
committed
ci: adds tooling to publish images file
1 parent 47966bc commit 68d1dc9

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.goreleaser.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Copyright 2023 Nutanix. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
version: 2
4+
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
55

6-
project_name: cluster-api-runtime-extensions-nutanix
6+
version: 2
77

88
changelog:
99
use: github
@@ -30,6 +30,7 @@ release:
3030
name_template: metadata.yaml
3131
- glob: runtime-extension-components.yaml
3232
- glob: ./charts/{{ .ProjectName }}/defaultclusterclasses/*.yaml
33+
- glob: caren-images.txt
3334

3435
before:
3536
hooks:
@@ -52,6 +53,10 @@ before:
5253
".releaseSeries |= (. + [{contract: \"v1beta1\", major: {{ .Major }}, minor: {{ .Minor }}}] | unique)" \
5354
metadata.yaml >release-metadata.yaml'
5455
- make template-helm-repository
56+
- |
57+
sh -ec 'if [ {{ .IsSnapshot }} == false ] ; then
58+
env CAREN_VERSION=v{{ trimprefix .Version "v" }} make list-images >caren-images.txt
59+
fi'
5560
5661
builds:
5762
- id: cluster-api-runtime-extensions-nutanix

make/addons.mk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,10 @@ sync-helm-values: ; $(info $(M) syncing helm values from hack to charts)
8888
-kustomize-directory=./hack/addons/kustomize/ \
8989
-helm-chart-directory=./charts/cluster-api-runtime-extensions-nutanix/ \
9090
-license-file=./hack/license-header.yaml.txt
91+
92+
.PHONY: list-images
93+
list-images:
94+
go run hack/tools/fetch-images/main.go \
95+
-chart-directory=./charts/cluster-api-runtime-extensions-nutanix/
96+
-helm-chart-configmap=./charts/cluster-api-runtime-extensions-nutanix/templates/helm-config.yaml \
97+
-caren-version=$(CAREN_VERSION) >> caren-images.txt

0 commit comments

Comments
 (0)