You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: charts/jenkins/CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,9 @@ Use the following links to reference issues, PRs, and commits prior to v2.6.0.
10
10
11
11
The change log until v1.5.7 was auto-generated based on git commits. Those entries include a reference to the git commit to be able to get more details.
Copy file name to clipboardExpand all lines: charts/jenkins/README.md
+53-14Lines changed: 53 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,29 +81,68 @@ Each key will become the name of a configuration yaml file on the master in /var
81
81
The lines after each `|` become the content of the configuration yaml file.
82
82
The first line after this is a JCasC root element, e.g. jenkins, credentials, etc.
83
83
Best reference is the Documentation link here: `https://<jenkins_url>/configuration-as-code`.
84
-
The example below creates ldap settings:
84
+
85
+
The example below sets custom systemMessage:
86
+
87
+
```yaml
88
+
master:
89
+
JCasC:
90
+
configScripts:
91
+
welcome-message: |
92
+
jenkins:
93
+
systemMessage: Welcome to our CI\CD server.
94
+
```
95
+
96
+
More complex example that creates ldap settings:
97
+
98
+
```yaml
99
+
master:
100
+
JCasC:
101
+
configScripts:
102
+
ldap-settings: |
103
+
jenkins:
104
+
securityRealm:
105
+
ldap:
106
+
configurations:
107
+
- server: ldap.acme.com
108
+
rootDN: dc=acme,dc=uk
109
+
managerPasswordSecret: ${LDAP_PASSWORD}
110
+
groupMembershipStrategy:
111
+
fromUserRecord:
112
+
attributeName: "memberOf"
113
+
```
114
+
115
+
Keep in mind that default configuration file already contains some values that you won't be able to override under configScripts section.
116
+
117
+
For example, you can not configure Jenkins URL and System Admin e-mail address like this because of conflictig configuration error.
118
+
119
+
Incorrect:
85
120
86
121
```yaml
87
-
configScripts:
88
-
ldap-settings: |
89
-
jenkins:
90
-
securityRealm:
91
-
ldap:
92
-
configurations:
93
-
- server: ldap.acme.com
94
-
rootDN: dc=acme,dc=uk
95
-
managerPasswordSecret: ${LDAP_PASSWORD}
96
-
groupMembershipStrategy:
97
-
fromUserRecord:
98
-
attributeName: "memberOf"
122
+
master:
123
+
JCasC:
124
+
configScripts:
125
+
jenkins-url: |
126
+
unclassified:
127
+
location:
128
+
url: https://example.com/jenkins
129
+
adminAddress: example@mail.com
130
+
```
131
+
132
+
Correct:
133
+
134
+
```yaml
135
+
master:
136
+
jenkinsUrl: https://example.com/jenkins
137
+
jenkinsAdminEmail: example@mail.com
99
138
```
100
139
101
140
Further JCasC examples can be found [here](https://github.com/jenkinsci/configuration-as-code-plugin/tree/master/demos).
102
141
103
142
#### Config as Code With or Without Auto-Reload
104
143
105
144
Config as Code changes (to `master.JCasC.configScripts`) can either force a new pod to be created and only be applied at next startup, or can be auto-reloaded on-the-fly.
106
-
If you set `master.sidecars.autoConfigReload.enabled` to `true`, a second, auxiliary container will be installed into the Jenkins master pod, known as a "sidecar".
145
+
If you set `master.sidecars.configAutoReload.enabled` to `true`, a second, auxiliary container will be installed into the Jenkins master pod, known as a "sidecar".
107
146
This watches for changes to configScripts, copies the content onto the Jenkins file-system and issues a POST to `http://<jenkins_url>/reload-configuration-as-code` with a pre-shared key.
108
147
You can monitor this sidecar's logs using command `kubectl logs <master_pod> -c jenkins-sc-config -f`.
109
148
If you want to enable auto-reload then you also need to configure rbac as the container which triggers the reload needs to watch the config maps:
0 commit comments