Skip to content

Commit

Permalink
fix(jenkinsio) ensure default values are valid. Closes jenkins-infra#658
Browse files Browse the repository at this point in the history
.

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
  • Loading branch information
dduportal committed Sep 28, 2023
1 parent 5bc0cbb commit e5dbb65
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/jenkinsio/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ maintainers:
- name: timja
- name: dduportal
name: jenkinsio
version: 0.6.0
version: 0.6.1
30 changes: 30 additions & 0 deletions charts/jenkinsio/tests/custom_values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
suite: Test with custom values
# templates:
# - deployment.yaml
# - ingress.yaml
# - nginx-configmap.yaml # Direct dependency of deployment.yaml
tests:
# - it: should create an ingress when ingress.enabled is true
# set:
# ingress:
# enabled: true
# template: ingress.yaml
# asserts:
# - hasDocuments:
# count: 1
# - it: should mount the html volume when htmlVolume is set
# template: deployment.yaml
# set:
# htmlVolume:
# hostPath: /host
# asserts:
# - hasDocuments:
# count: 1
# - isKind:
# of: Deployment
# - equal:
# path: spec.template.spec.volumes[0].name
# value: html
# - equal:
# path: spec.template.spec.volumes[0].hostPath
# value: /host
27 changes: 27 additions & 0 deletions charts/jenkinsio/tests/defaults_values_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
suite: Test with default values
templates:
- deployment.yaml
- zh-deployment.yaml
- zh-configmap.yaml
- nginx-configmap.yaml
tests:
- it: should create a deployment for jenkins.io with default values
template: deployment.yaml
asserts:
- hasDocuments:
count: 1
- isKind:
of: Deployment
- equal:
path: metadata.name
value: RELEASE-NAME-jenkinsio
- it: should create a deployment for zh.jenkins.io with default values
template: zh-deployment.yaml
asserts:
- hasDocuments:
count: 1
- isKind:
of: Deployment
- equal:
path: metadata.name
value: RELEASE-NAME-jenkinsio-zh
4 changes: 3 additions & 1 deletion charts/jenkinsio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ingress:
# - secretName: plugins-tls
# hosts:
# - plugins.jenkins.io
resources:
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
Expand All @@ -50,5 +50,7 @@ nodeSelector: {}
tolerations: []
affinity: {}
htmlVolume:
emptyDir: {}
zhHtmlVolume:
emptyDir: {}
forceJenkinsIoHost: false

0 comments on commit e5dbb65

Please sign in to comment.