Skip to content

Commit fb8f67c

Browse files
authored
[jenkins] Add option to configure defaultMode for reference content (#36)
Signed-off-by: Reinhard Nägele <[email protected]>
1 parent 92aa38c commit fb8f67c

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

charts/jenkins/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
name: jenkins
33
description: The leading open source automation server
4-
version: 1.2.0
4+
version: 1.3.0
55
appVersion: 2.164.3
66
home: https://jenkins.io/
77
icon: https://wiki.jenkins-ci.org/download/attachments/2916393/logo.png

charts/jenkins/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,18 @@ referenceContent:
160160

161161
The example above will create `/var/jenkins_home/foo.txt` and `/var/jenkins_home/bar/baz.txt`.
162162

163+
For adding custom scripts that should be executable, the `defaultMode` can be set on the volume:
164+
165+
```yaml
166+
referenceContent:
167+
- relativeDir: my-scripts
168+
defaultMode: 0555
169+
data:
170+
- fileName: foo.sh
171+
fileContent: |
172+
echo foo
173+
```
174+
163175
#### Plugins
164176

165177
Reference content may be used to configure plugins to be installed with the [mechanism](https://github.com/jenkinsci/docker/blob/master/README.md#preinstalling-plugins) that comes with the Jenkins Docker image.

charts/jenkins/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ spec:
146146
- name: {{ include "jenkins.configmapSuffix" . }}
147147
configMap:
148148
name: {{ include "jenkins.fullname" $ }}-{{ include "jenkins.configmapSuffix" . }}
149+
{{- with .defaultMode }}
150+
defaultMode: {{ . }}
151+
{{- end }}
149152
{{- end }}
150153
{{- with .Values.extraVolumes }}
151154
{{- tpl . $ | nindent 8 }}

0 commit comments

Comments
 (0)