File tree Expand file tree Collapse file tree 5 files changed +45
-1
lines changed Expand file tree Collapse file tree 5 files changed +45
-1
lines changed Original file line number Diff line number Diff line change @@ -49,3 +49,4 @@ test/e2e/config/caren-envsubst.yaml
4949/release-metadata.yaml
5050hack /tools /fetch-images /fetch-images
5151caren-images.txt
52+ hack /examples /release /* -cluster-class.yaml
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ release:
3030 - glob : release-metadata.yaml
3131 name_template : metadata.yaml
3232 - glob : runtime-extensions-components.yaml
33- - glob : ./charts/{{ .ProjectName }}/defaultclusterclasses/* .yaml
33+ - glob : ./hack/examples/release/*-cluster-class .yaml
3434 - glob : caren-images.txt
3535
3636before :
@@ -58,6 +58,10 @@ before:
5858 sh -ec 'if [ {{ .IsSnapshot }} == false ] ; then
5959 make --no-print-directory CAREN_VERSION=v{{ trimprefix .Version "v" }} list-images >caren-images.txt
6060 fi'
61+ - |
62+ sh -ec 'if [ {{ .IsSnapshot }} == false ] ; then
63+ make --no-print-directory CAREN_VERSION=v{{ trimprefix .Version "v" }} add-version-to-clusterclasses
64+ fi'
6165
6266builds :
6367 - id : cluster-api-runtime-extensions-nutanix
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Copyright 2024 Nutanix. All rights reserved.
4+ # SPDX-License-Identifier: Apache-2.0
5+
6+ set -euo pipefail
7+ IFS=$' \n\t '
8+
9+ SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
10+ readonly SCRIPT_DIR
11+
12+ trap ' find "${SCRIPT_DIR}" -name kustomization.yaml -delete' EXIT
13+
14+ export CAREN_RELEASE_VERSION=" ${1} "
15+
16+ for CC_TEMPLATE in " ${SCRIPT_DIR} " /../../../charts/cluster-api-runtime-extensions-nutanix/defaultclusterclasses/* .yaml; do
17+ export CC_TEMPLATE
18+ envsubst -no-empty -no-unset -i " ${SCRIPT_DIR} /kustomization.yaml.tmpl" -o " ${SCRIPT_DIR} /kustomization.yaml"
19+
20+ kustomize build " ${SCRIPT_DIR} " --load-restrictor LoadRestrictionsNone > " ${SCRIPT_DIR} /$( basename " ${CC_TEMPLATE} " ) "
21+ done
Original file line number Diff line number Diff line change 1+ # Copyright 2023 Nutanix. All rights reserved.
2+ # SPDX-License-Identifier: Apache-2.0
3+
4+ apiVersion: kustomize.config.k8s.io/v1beta1
5+ kind: Kustomization
6+
7+ sortOptions:
8+ order: fifo
9+
10+ commonAnnotations:
11+ caren.nutanix.com/version: "${CAREN_RELEASE_VERSION}"
12+
13+ resources:
14+ - "${CC_TEMPLATE}"
Original file line number Diff line number Diff line change @@ -42,3 +42,7 @@ release-snapshot: go-generate ; $(info $(M) building snapshot release $*)
4242.PHONY : list-releases
4343list-releases : # # List releases from GitHub
4444 gh release list --json tagName | gojq -r .[].tagName
45+
46+ .PHONY : add-version-to-clusterclasses
47+ add-version-to-clusterclasses :
48+ ./hack/examples/release/add-version-to-clusterclasses.sh $(CAREN_VERSION )
You can’t perform that action at this time.
0 commit comments