Skip to content

Commit

Permalink
Fixes #290 - helm test fails with exception (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgruner committed Sep 4, 2024
1 parent 9160f0e commit ca261f2
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 26 deletions.
2 changes: 1 addition & 1 deletion zammad/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: zammad
version: 12.3.4
version: 12.3.5
appVersion: 6.3.1-130
description: Zammad is a web based open source helpdesk/customer support system with many features to manage customer communication via several channels like telephone, facebook, twitter, chat and e-mails.
home: https://zammad.org
Expand Down
9 changes: 0 additions & 9 deletions zammad/ci/default-values.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +0,0 @@
zammadConfig:
customVolumes:
- name: custom-volume
configMap:
name: helm-tests
customVolumeMounts:
- name: custom-volume
mountPath: /opt/zammad/lib/tasks/helm
readOnly: true
15 changes: 2 additions & 13 deletions zammad/ci/full-objects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,7 @@ spec:
apiVersion: v1
kind: ConfigMap
metadata:
name: helm-tests
name: custom-file
namespace: zammad
data:
helm-test.rake: |-
namespace :zammad do
namespace :helm do
desc 'Runs a set of Helm tests'
task test: :environment do |_task, args|
puts 'Checking if temporary file can be created...'
Tempfile.create do |f|
puts ' Temporary file was created successfully.'
end
end
end
end
custom_file.txt: test
4 changes: 2 additions & 2 deletions zammad/ci/full-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ zammadConfig:
customVolumes:
- name: custom-volume
configMap:
name: helm-tests
name: custom-file
customVolumeMounts:
- name: custom-volume
mountPath: /opt/zammad/lib/tasks/helm
mountPath: /opt/zammad/custom_mount
readOnly: true
nginx:
podLabels:
Expand Down
30 changes: 29 additions & 1 deletion zammad/templates/tests/run-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: "{{ include "zammad.fullname" . }}-helm-test-rake-task"
labels:
{{- include "zammad.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test
data:
helm-test.rake: |-
namespace :zammad do
namespace :helm do
desc 'Runs a set of Helm tests'
task test: :environment do |_task, args|
puts 'Checking if temporary file can be created...'
Tempfile.create do |f|
puts ' Temporary file was created successfully.'
end
end
end
end
---
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "zammad.fullname" . }}-run-tests"
name: "{{ include "zammad.fullname" . }}-run-helm-test-rake-task"
labels:
{{- include "zammad.labels" . | nindent 4 }}
annotations:
Expand All @@ -18,6 +40,12 @@ spec:
{{- include "zammad.env.failOnPendingMigrations" . | nindent 12 }}
volumeMounts:
{{- include "zammad.volumeMounts" . | nindent 10 }}
- name: helm-rake-test-volume
mountPath: /opt/zammad/lib/tasks/helm
readOnly: true
volumes:
{{- include "zammad.volumes" . | nindent 6 }}
- name: helm-rake-test-volume
configMap:
name: "{{ include "zammad.fullname" . }}-helm-test-rake-task"
restartPolicy: Never

0 comments on commit ca261f2

Please sign in to comment.