The scripts is working ok but we noticed that every time we restart jenkins the value changed back to the old credentials. I checked and seems that the problem is because is not writing the changes in the config.xml of each job. Is this a normal behavior?