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 27, 2024
1 parent cad5c0f commit a3271b0
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 24 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ jobs:
uses: steadybit/extension-kit/.github/workflows/reusable-extension-ci.yml@main
with:
build_linux_packages: false
VERSION_BUMPER_APPID: ${{ vars.GH_APP_STEADYBIT_APP_ID }}
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
PAT_TOKEN_EXTENSION_DEPLOYER: ${{ secrets.PAT_TOKEN_EXTENSION_DEPLOYER }}
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
VERSION_BUMPER_SECRET: ${{ secrets.GH_APP_STEADYBIT_PRIVATE_KEY }}
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-istio/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
name: steadybit-extension-istio
description: Steadybit Istio extension Helm chart for Kubernetes.
version: 1.0.24
appVersion: latest
version: 1.1.0
appVersion: v1.0.7
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-istio/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
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ manifest should match snapshot using podAnnotations and Labels:
value: text
- name: STEADYBIT_EXTENSION_CLUSTER_NAME
value: production
image: ghcr.io/steadybit/extension-istio:latest
imagePullPolicy: Always
image: ghcr.io/steadybit/extension-istio:v0.0.0
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 5
httpGet:
Expand Down Expand Up @@ -112,8 +112,8 @@ manifest should match snapshot with TLS:
value: /etc/extension/certificates/server-cert/tls.key
- name: STEADYBIT_EXTENSION_CLUSTER_NAME
value: production
image: ghcr.io/steadybit/extension-istio:latest
imagePullPolicy: Always
image: ghcr.io/steadybit/extension-istio:v0.0.0
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 5
httpGet:
Expand Down Expand Up @@ -200,8 +200,8 @@ manifest should match snapshot with extra env vars:
name: env-configmap
- name: env-secrets
secretRef: null
image: ghcr.io/steadybit/extension-istio:latest
imagePullPolicy: Always
image: ghcr.io/steadybit/extension-istio:v0.0.0
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 5
httpGet:
Expand Down Expand Up @@ -276,8 +276,8 @@ manifest should match snapshot with extra labels:
value: text
- name: STEADYBIT_EXTENSION_CLUSTER_NAME
value: null
image: ghcr.io/steadybit/extension-istio:latest
imagePullPolicy: Always
image: ghcr.io/steadybit/extension-istio:v0.0.0
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 5
httpGet:
Expand Down Expand Up @@ -356,8 +356,8 @@ manifest should match snapshot with mutual TLS:
value: /etc/extension/certificates/client-cert-a/tls.crt,/etc/extension/certificates/client-cert-a/tls.crt
- name: STEADYBIT_EXTENSION_CLUSTER_NAME
value: production
image: ghcr.io/steadybit/extension-istio:latest
imagePullPolicy: Always
image: ghcr.io/steadybit/extension-istio:v0.0.0
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 5
httpGet:
Expand Down Expand Up @@ -450,8 +450,8 @@ manifest should match snapshot with mutual TLS using containerPaths:
value: /etc/tls/ca.crt,/etc/tls/ca2.crt
- name: STEADYBIT_EXTENSION_CLUSTER_NAME
value: null
image: ghcr.io/steadybit/extension-istio:latest
imagePullPolicy: Always
image: ghcr.io/steadybit/extension-istio:v0.0.0
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 5
httpGet:
Expand Down Expand Up @@ -524,8 +524,8 @@ manifest should match snapshot with podSecurityContext:
value: text
- name: STEADYBIT_EXTENSION_CLUSTER_NAME
value: null
image: ghcr.io/steadybit/extension-istio:latest
imagePullPolicy: Always
image: ghcr.io/steadybit/extension-istio:v0.0.0
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 5
httpGet:
Expand Down Expand Up @@ -600,8 +600,8 @@ manifest should match snapshot with priority class:
value: text
- name: STEADYBIT_EXTENSION_CLUSTER_NAME
value: null
image: ghcr.io/steadybit/extension-istio:latest
imagePullPolicy: Always
image: ghcr.io/steadybit/extension-istio:v0.0.0
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 5
httpGet:
Expand Down Expand Up @@ -675,8 +675,8 @@ manifest should match snapshot without TLS:
value: text
- name: STEADYBIT_EXTENSION_CLUSTER_NAME
value: production
image: ghcr.io/steadybit/extension-istio:latest
imagePullPolicy: Always
image: ghcr.io/steadybit/extension-istio:v0.0.0
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 5
httpGet:
Expand Down
2 changes: 2 additions & 0 deletions charts/steadybit-extension-istio/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
templates:
- deployment.yaml
chart:
appVersion: v0.0.0
tests:
- it: manifest should match snapshot without TLS
set:
Expand Down
6 changes: 3 additions & 3 deletions charts/steadybit-extension-istio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ kubernetes:
image:
# image.name -- The container image to use for the Steadybit istio extension.
name: ghcr.io/steadybit/extension-istio
# image.tag -- tag name of the extension-istio container image to use.
# image.tag -- tag name of the extension-istio container image to use. Defaults to appVersion of this chart.
# See https://github.com/steadybit/extension-istio/pkgs/container/extension-istio/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 a3271b0

Please sign in to comment.