imranity/useful-jenkins-groovy-init-scripts

Groovy script runs but no changes are performed

Opened this issue · 1 comments

Dear hayderimran7,
This groovy script runs successfully (LDAP) but no changes are done to Jenkins config.xml file thus no changes are applied (default is Jenkins database and whoever is logged can do anything).
Is there anything else that needs to happen after the groovy script runs? Is the passcode cleartext or hash?
I'd appreciate if you could clarify. I imagine the groovy script would cause changes to the config.xml file as it happens if I configure it via Web UI.
Thanks in advance!

hmm i would suggest first running under Jenkins --> Settings --> Script Console.
If it runs fine, then you should see your jenkins security changed to LDAP.
also, make sure you place the script in init.groovy.d folder in jenkins home