Jenkins is running happily, with jenkins home mounted outside the container on a network share.
When upgrading the docker image to a new version with some changes to the init.groovy.d scripts, the scripts do not get updated in the jenkins home.
Old scripts are run.
The scripts should have been replaced in the jenkins home folder, so the updated scripts runs.
Not relevant. Scripts work fine when creating a new container with a blank jenkins home
// Edit someone with the same issue:
https://stackoverflow.com/questions/45818327/jenkins-updating-init-groovy-d-files-in-a-docker-container
files that already exist are explicitly not overwritten to avoid overwritting UI changed configuration
https://github.com/jenkinsci/docker/blob/master/jenkins-support#L110
Ahh, I see now. I also noticed that *.override condition. If you look at the README, that appears to be the workaround.
In case you do want to override, append '.override' to the name of the reference file. E.g. a file named /usr/share/jenkins/ref/config.xml.override will overwrite an existing config.xml file in JENKINS_HOME.
solution provided
Most helpful comment
Ahh, I see now. I also noticed that
*.overridecondition. If you look at the README, that appears to be the workaround.