jenkins: clean stale JCasC files on startup
This commit is contained in:
parent
30048a9ae5
commit
1f98a5be12
@ -79,6 +79,21 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: jenkins-oidc
|
name: jenkins-oidc
|
||||||
key: logoutUrl
|
key: logoutUrl
|
||||||
|
customInitContainers:
|
||||||
|
- name: clean-jcasc-stale
|
||||||
|
image: alpine:3.20
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
set -euo pipefail
|
||||||
|
rm -f /var/jenkins_home/casc_configs/*.yaml || true
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
volumeMounts:
|
||||||
|
- name: jenkins-home
|
||||||
|
mountPath: /var/jenkins_home
|
||||||
initScripts:
|
initScripts:
|
||||||
oidc.groovy: |
|
oidc.groovy: |
|
||||||
import hudson.util.Secret
|
import hudson.util.Secret
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user