Skip to content

Commit dc26c55

Browse files
feat(cf-common): add versions for named templates (#27)
1 parent 77f397b commit dc26c55

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+229
-193
lines changed

.github/workflows/lint-test.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,18 @@ jobs:
8080
echo -e '\033[0;32mDocumentation up to date\033[0m ✔'
8181
fi
8282
83+
- name: Run templates version check
84+
id: tpl-versions
85+
run: |
86+
./scripts/update-tpl-version.sh
87+
if [[ $(git diff --stat) != '' ]]; then
88+
echo -e '\033[0;31mNamed templates versions outdated!\033[0m ❌ Run ./scripts/update-tpl-version.sh before commit!'
89+
git diff --color
90+
exit 1
91+
else
92+
echo -e '\033[0;32mNamed templates versions up to date\033[0m ✔'
93+
fi
94+
8395
- name: Create kind cluster
8496
uses: helm/[email protected]
8597

charts/cf-common-test/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ keywords:
1313
- libs
1414
maintainers:
1515
- name: codefresh
16-
url: https://codefresh-io.github.io/
16+
url: https://codefresh-io.github.io/
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
{{- include "cf-common.configmaps" . -}}
1+
{{ $templateName := printf "cf-common-%s.configmaps" (index .Subcharts "cf-common").Chart.Version }}
2+
{{- include $templateName . -}}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
{{- include "cf-common.controller" . -}}
1+
{{ $templateName := printf "cf-common-%s.controller" (index .Subcharts "cf-common").Chart.Version }}
2+
{{- include $templateName . -}}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
{{- include "cf-common.extraResources" . -}}
1+
{{ $templateName := printf "cf-common-%s.extraResources" (index .Subcharts "cf-common").Chart.Version }}
2+
{{- include $templateName . -}}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
{{- include "cf-common.hpa" . -}}
1+
{{ $templateName := printf "cf-common-%s.hpa" (index .Subcharts "cf-common").Chart.Version }}
2+
{{- include $templateName . -}}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
{{- include "cf-common.ingress" . -}}
1+
{{ $templateName := printf "cf-common-%s.ingress" (index .Subcharts "cf-common").Chart.Version }}
2+
{{- include $templateName . -}}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
{{- include "cf-common.pdb" . -}}
1+
{{ $templateName := printf "cf-common-%s.pdb" (index .Subcharts "cf-common").Chart.Version }}
2+
{{- include $templateName . -}}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
{{- include "cf-common.rbac" . -}}
1+
{{ $templateName := printf "cf-common-%s.rbac" (index .Subcharts "cf-common").Chart.Version }}
2+
{{- include $templateName . -}}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
{{- include "cf-common.secrets" . -}}
1+
{{ $templateName := printf "cf-common-%s.secrets" (index .Subcharts "cf-common").Chart.Version }}
2+
{{- include $templateName . -}}

0 commit comments

Comments
 (0)