Morning

I'm trying to migrate a plugin that used to use plain text for handling 
tokens to one that uses Secret. I am following 
https://wiki.jenkins.io/display/JENKINS/Hint+on+retaining+backward+compatibility
 and 
have converted all my field types to Secret from String for the token in 
question.

This all works fine when I run the plugin (I think the readResolve method 
is doing some magic at runtime) and if I create a new job configuration (I 
can see an encrypted form of my entered token in the config.xml file). 
However for existing jobs that already that an unencrypted plain text token 
in the config.xml it remains that way and appears never to get resaved in 
the encrypted form. So whilst the plugin uses Secrets, there is still old 
data that is persisted in plain text form.

What's the best way to migrate those over without asking the user to go 
into each of their jobs updating it?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/f532cd94-4af2-4c13-bdb9-7a94e024620d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to