InitScripts doesn't work
Is this a request for help?: Yes
What happened: I want to add some command to Jenkins Master. But no changes in my jenkins master, still no init script in my jenkins master container What you expected to happen: Container run the scripts every pods restart
How to reproduce it (as minimally and precisely as possible): I added like this : InitScripts: - sh "apt update" - sh "apt install vim"
You can check this code to see where the InitScripts are used:
https://github.com/helm/charts/blob/master/stable/jenkins/templates/config.yaml#L255-L258
You can only provide groovy scripts here. They are executed by Jenkins during startup.
- Post-initialization script
- This repo contains some examples for init scripts: https://github.com/buildit/jenkins-startup-scripts/tree/master/scripts/scripts
Many issues / PRs in this repository contain the chart name as prefix in the title [stable/jenkins]. That makes it easier to see to which chart the issue belongs.
@foosome Did you switch to using Groovy for the script as @torstenwalter mentioned?
e.g. something like
InitScript: my-script-here: |- import jenkins.model.* groovy_code_here()