Are you just wanting token-macro to expand tokens in a string, or is there more to what you want to do?
On Fri, Oct 2, 2020 at 11:37 AM Andrew Grimberg < [email protected]> wrote: > I'm trying to extend the config-file-provider in support of > https://issues.jenkins-ci.org/browse/JENKINS-43204 > > My thoughts are to utilize the token-macro plugin to do the expansion, > especially since it's already a dependency of the config-file-provider > > Unfortunately, I'm not a strong Java developer. I work mostly in Perl > and a little bit of Python so I feel I'm failing to figure out how to do > this correctly. I see no way to instantiate a TokenMacro (or > DataBoundTokenMacro) object with a key / value pair such that I can > create a List<TokenMacro> to pass to TokenMacro.expand to do the actual > work. > > My intent is to either extend the custom file type itself to support > defined credentials that get automatically expanded in the configuration > file, or a brand new file type that does this. > > At this point, I've basically cloned the properties file type which > allows me to define tokenized credentials and just write them back out > to the file when the file gets rendered to disk. Now I'm trying to take > the next step and actually convert those into something that TokenMacro > can then expand for me in the defined file but as I said, I'm failing to > figure out how instantiate the object. > > If I'm going about this all wrong, I would love to know that too, but > this seems like it should be fairly straight forward to me to leverage > this. > > -Andy- > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/40f71460-348d-2cca-17a1-96f10a325020%40linuxfoundation.org > . > -- Website: http://earl-of-code.com -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAPiUgVe2Kzx5mNBH0PVgVJ%2B2Sb0wdP4EDtP8JE%2BcBaMjEKPYaQ%40mail.gmail.com.
