Skip to content

Commit

Permalink
build: bump appVersion in Helm chart on release
Browse files Browse the repository at this point in the history
  • Loading branch information
joshiste committed Jan 26, 2024
1 parent dd2054b commit 3441b9b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ charttesting:
chartlint:
ct lint --config chartTesting.yaml

## chart-bump-version: Bump the patch version and optionally set the appVersion
.PHONY: chart-bump-version
chart-bump-version:
@set -e; \
for dir in charts/steadybit-extension-*; do \
if [ ! -z "$(APP_VERSION)" ]; then \
yq -i ".appVersion = strenv(APP_VERSION)" $$dir/Chart.yaml; \
fi; \
CHART_VERSION=$$(semver -i patch $$(yq '.version' $$dir/Chart.yaml)) \
yq -i ".version = strenv(CHART_VERSION)" $$dir/Chart.yaml; \
grep -e "^version:" -e "^appVersion:" $$dir/Chart.yaml; \
done
# ==================================================================================== #
# BUILD
# ==================================================================================== #
Expand Down
4 changes: 2 additions & 2 deletions charts/steadybit-extension-http/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
name: steadybit-extension-http
description: Steadybit action implementation to check HTTP endpoints.
version: 1.0.22
appVersion: latest
version: 1.1.0
appVersion: v1.0.15
home: https://www.steadybit.com/
icon: https://steadybit-website-assets.s3.amazonaws.com/logo-symbol-transparent.png
maintainers:
Expand Down
2 changes: 1 addition & 1 deletion charts/steadybit-extension-http/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- image: {{ .Values.image.name }}:{{ .Values.image.tag }}
- image: {{ .Values.image.name }}:{{ default .Chart.AppVersion .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: extension
resources:
Expand Down
6 changes: 3 additions & 3 deletions charts/steadybit-extension-http/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
image:
# image.name -- The container image to use for the Steadybit scaffold extension.
name: ghcr.io/steadybit/extension-http
# image.tag -- tag name of the extension-http container image to use.
# image.tag -- tag name of the extension-http container image to use. Defaults to appVersion of this chart.
# See https://github.com/steadybit/extension-http/pkgs/container/extension-http/versions for all tags.
tag: latest
tag: null
# image.pullPolicy -- Specifies when to pull the image container.
pullPolicy: Always
pullPolicy: IfNotPresent

tls:
server:
Expand Down

0 comments on commit 3441b9b

Please sign in to comment.