Skip to content

Commit e929024

Browse files
authored
Improve Documentation around JCasc and Custom Image (#207)
1 parent f458bba commit e929024

4 files changed

Lines changed: 20 additions & 7 deletions

File tree

charts/jenkins/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ Use the following links to reference issues, PRs, and commits prior to v2.6.0.
1212
The change log until v1.5.7 was auto-generated based on git commits.
1313
Those entries include a reference to the git commit to be able to get more details.
1414

15+
## 3.0.13
16+
17+
Improve Documentation around JCasc and Custom Image
18+
1519
## 3.0.12
1620

1721
Added GitHub Action testing on Kind 1.16, 1.17, 1.18, 1.19 & 1.20

charts/jenkins/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: jenkins
33
home: https://jenkins.io/
4-
version: 3.0.12
4+
version: 3.0.13
55
appVersion: 2.263.1
66
description: Jenkins - Build great things at any scale! The leading open source automation server, Jenkins provides hundreds of plugins to support building, deploying and automating any project.
77
sources:

charts/jenkins/README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ controller:
112112
installPlugins: []
113113
```
114114
115-
Notice: `installPlugins` is set to an empty list to disable plugin download.
115+
Notice: `installPlugins` is set to an empty list to disable plugin download. In this case, the image `registry/my-jenkins:v1.2.3` must have the plugins specified as default value for [the `controller.installPlugins` directive](https://github.com/jenkinsci/helm-charts/blob/main/charts/jenkins/VALUES_SUMMARY.md#jenkins-plugins) to ensure that the configuration side-car system works as expected.
116116

117117
In case you are using a private registry you can use 'imagePullSecretName' to specify the name of the secret to use when pulling the image:
118118

@@ -133,14 +133,23 @@ If you are not using the provided ingress you can specify `controller.jenkinsUrl
133133

134134
### Configuration as Code
135135

136-
Jenkins Configuration as Code is now a standard component in the Jenkins project.
137-
Add a key under configScripts for each configuration area, where each corresponds to a plugin or section of the UI.
138-
The keys (prior to `|` character) are just labels, and can be any value.
139-
They are only used to give the section a meaningful name.
136+
Jenkins Configuration as Code (JCasC) is now a standard component in the Jenkins project.
137+
To allow JCasC's configuration from the helm values, the plugin [`configuration-as-code`](https://plugins.jenkins.io/configuration-as-code/) must be installed in the Jenkins Controller's Docker image (which is the case by default as specified by the [default value of the directive `controller.installPlugins`](https://github.com/jenkinsci/helm-charts/blob/main/charts/jenkins/VALUES_SUMMARY.md#jenkins-plugins)).
138+
139+
JCasc configuration is passed through Helm values under the key `controller.JCasC`.
140+
The section ["Jenkins Configuration as Code (JCasC)" of the page "VALUES_SUMMARY.md"](https://github.com/jenkinsci/helm-charts/blob/main/charts/jenkins/VALUES_SUMMARY.md#jenkins-configuration-as-code-jcasc) lists all the possible directives.
141+
142+
In particular, you may specify custom JCasC scripts by adding sub-key under the `controller.JCasC.configScripts` for each configuration area where each corresponds to a plugin or section of the UI.
143+
144+
The sub-keys (prior to `|` character) are only labels used to give the section a meaningful name.
140145
The only restriction is they must conform to RFC 1123 definition of a DNS label, so they may only contain lowercase letters, numbers, and hyphens.
146+
141147
Each key will become the name of a configuration yaml file on the controller in `/var/jenkins_home/casc_configs` (by default) and will be processed by the Configuration as Code Plugin during Jenkins startup.
148+
142149
The lines after each `|` become the content of the configuration yaml file.
150+
143151
The first line after this is a JCasC root element, e.g. jenkins, credentials, etc.
152+
144153
Best reference is the Documentation link here: `https://<jenkins_url>/configuration-as-code`.
145154

146155
The example below sets custom systemMessage:

charts/jenkins/VALUES_SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ The following tables list the configurable parameters of the Jenkins chart and t
7272

7373
| Parameter | Description | Default |
7474
| --------------------------------- | ------------------------------------ | ----------------------------------------- |
75-
| `controller.installPlugins` | List of Jenkins plugins to install. If you don't want to install plugins set it to `[]` | `kubernetes:1.18.2 workflow-aggregator:2.6 credentials-binding:1.19 git:3.11.0 workflow-job:2.33` |
75+
| `controller.installPlugins` | List of Jenkins plugins to install. If you don't want to install plugins set it to `[]` | `kubernetes:1.27.6 workflow-aggregator:2.6 git:4.4.5 configuration-as-code:1.46` |
7676
| `controller.additionalPlugins` | List of Jenkins plugins to install in addition to those listed in controller.installPlugins | `[]` |
7777
| `controller.initializeOnce` | Initialize only on first install. Ensures plugins do not get updated inadvertently. Requires `persistence.enabled` to be set to `true`. | `false` |
7878
| `controller.overwritePlugins` | Overwrite installed plugins on start.| `false` |

0 commit comments

Comments
 (0)