Skip to content

Commit

Permalink
ci: replace __appVersion__ in all Chart.yaml files
Browse files Browse the repository at this point in the history
  • Loading branch information
tnotheis committed Apr 23, 2024
1 parent b8da875 commit 9b80131
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .ci/helm/buildChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ import { getRequiredEnvVar } from "../lib.js";
const version = getRequiredEnvVar("VERSION");

await $`helm dependency update helm`;
await $`helm package --set global.chartVersion=${version} --version ${version} helm`;

// replace <<app_version>> in all files in helm/**/Chart.yaml with the value of `version`
await $`find helm -name Chart.yaml -exec sed -i -e 's/__app_version__/${version}/g' {} +`;

await $`helm package --version ${version} helm`;
2 changes: 2 additions & 0 deletions helm/charts/admincli/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ description: A Helm chart for Kubernetes
type: application

version: "1.0.0"

appVersion: "__appVersion__"
2 changes: 1 addition & 1 deletion helm/charts/admincli/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
image: "{{ .Values.image.repository }}:{{- default .Values.global.chartVersion .Values.image.tagOverride }}"
image: "{{ .Values.image.repository }}:{{- default .Chart.AppVersion .Values.image.tagOverride }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: Database__Provider
Expand Down
2 changes: 2 additions & 0 deletions helm/charts/adminui/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ description: A Helm chart for Kubernetes
type: application

version: "1.0.0"

appVersion: "__appVersion__"
2 changes: 1 addition & 1 deletion helm/charts/adminui/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
image: "{{ .Values.image.repository }}:{{- default .Values.global.chartVersion .Values.image.tagOverride }}"
image: "{{ .Values.image.repository }}:{{- default .Chart.AppVersion .Values.image.tagOverride }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
Expand Down
2 changes: 2 additions & 0 deletions helm/charts/consumerapi/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ description: A Helm chart for Kubernetes
type: application

version: "1.0.0"

appVersion: "__appVersion__"
2 changes: 1 addition & 1 deletion helm/charts/consumerapi/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
image: "{{ .Values.image.repository }}:{{- default .Values.global.chartVersion .Values.image.tagOverride }}"
image: "{{ .Values.image.repository }}:{{- default .Chart.AppVersion .Values.image.tagOverride }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
Expand Down
2 changes: 2 additions & 0 deletions helm/charts/eventhandler/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ description: A Helm chart for Kubernetes
type: application

version: "1.0.0"

appVersion: "__appVersion__"
2 changes: 1 addition & 1 deletion helm/charts/eventhandler/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
image: "{{ .Values.image.repository }}:{{- default .Values.global.chartVersion .Values.image.tagOverride }}"
image: "{{ .Values.image.repository }}:{{- default .Chart.AppVersion .Values.image.tagOverride }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: settings-override
Expand Down

0 comments on commit 9b80131

Please sign in to comment.