Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/update-helm-version #44

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,11 @@ tasks:
cmds:
- |
BUILD_IMAGE=$(ko build {{ .MODULE }} --image-label org.opencontainers.image.source=https://github.com/stuttgart-things/clusterbook --push)
VERSION={{ .VERSION }}
echo ${BUILD_IMAGE}
dagger call -m github.com/jpadams/daggerverse/[email protected] scan-image --image-ref ${BUILD_IMAGE}

# RELEASE
# BUILD FOR RELEASE
{{ if eq .RELEASE "true" }}
VERSION=$([ "$(git branch --show-current)" != "main" ] && echo "dev-$(git describe --tags --abbrev=0)" || echo $(git describe --tags --abbrev=0))
skopeo copy --src-tls-verify=false --dest-tls-verify=false docker://${BUILD_IMAGE} docker://{{ .RELEASE_IMAGE }}:${VERSION}
Expand All @@ -101,8 +102,8 @@ tasks:
# UPDATE HELM CHART
sed -i "s|^\(\s*image:\s*\).*|\1$(echo ${BUILD_IMAGE} | awk -F':' '{print $1}')|" {{ .CHART_DIR }}/{{ .PROJECT_NAME }}/values.yaml
sed -i "s|^\(\s*tag:\s*\).*|\1$(echo ${BUILD_IMAGE} | awk -F':' '{print $2}')|" {{ .CHART_DIR }}//{{ .PROJECT_NAME }}/values.yaml
sed -i "s/^version: .*/version: {{ .VERSION }}-chart/" {{ .META_PATH }}
sed -i "s/^appVersion: .*/appVersion: {{ .VERSION }}/" {{ .META_PATH }}
sed -i "s/^version: .*/version: ${VERSION}-chart/" {{ .META_PATH }}
sed -i "s/^appVersion: .*/appVersion: ${VERSION}/" {{ .META_PATH }}

# UPDATE HELMFILE
yq eval ".imageTag = \"$(echo ${BUILD_IMAGE} | awk -F':' '{print $2}')\"" -i {{ .PATH_HELM_ENV }}/{{ .K8S_ENV }}.yaml
Expand Down
4 changes: 2 additions & 2 deletions helm/clusterbook/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: clusterbook
description: A Helm chart for Kubernetes
type: application
version: v1.2.0-chart
appVersion: v1.2.0
version: dev-v1.2.0-chart
appVersion: dev-v1.2.0
dependencies:
- name: sthings-helm-toolkit
version: 2.4.74
Expand Down
4 changes: 2 additions & 2 deletions helm/clusterbook/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ deployment:
memory: 128Mi
containers:
clusterbook:
image: ghcr.io/stuttgart-things/clusterbook/clusterbook-5f3bb9105a15fafb0e52842968611a61@sha256
image: ghcr.io/stuttgart-things/clusterbook/clusterbook
replicaCount: 1
imagePullPolicy: Always
tag: 66bf3b7ce1d609af5b767f84d0b30c2f2e635a0db8f25025c29719daa99f0adb
tag: v1.2.1
securityContext:
capabilities: {}

Expand Down
2 changes: 1 addition & 1 deletion helm/env/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ enableCertificateRequest: true
ingressDomain: fluxdev-3.sthings-vsphere.labul.sva.de #rke2.sthings-vsphere.labul.sva.de
issuerKind: ClusterIssuer
issuerName: vault-approle
imageTag: 66bf3b7ce1d609af5b767f84d0b30c2f2e635a0db8f25025c29719daa99f0adb
imageTag: v1.2.1