While investigating this I found JENKINS-40279 which I think is related.
I would like to try my hand at running Jenkins from source with a debugger attached and see if I can reproduce the issue and propose a fix. But that's a very lofty goal for a fellow with my outstanding commitments.
An alternative to these run-once Groovy scripts is to start making use of the $JENKINS_HOME/init.groovy.d directory. Into which Groovy scripts can be placed and they'll be run on Jenkins startup. But our Jenkins startup time is already measured in minutes due to the number of pull request hooks that get checked so if I can keep these run-once that works better for me.
While investigating this I found JENKINS-40279 which I think is related.
I would like to try my hand at running Jenkins from source with a debugger attached and see if I can reproduce the issue and propose a fix. But that's a very lofty goal for a fellow with my outstanding commitments.
An alternative to these run-once Groovy scripts is to start making use of the
$JENKINS_HOME/init.groovy.d
directory. Into which Groovy scripts can be placed and they'll be run on Jenkins startup. But our Jenkins startup time is already measured in minutes due to the number of pull request hooks that get checked so if I can keep these run-once that works better for me.