I don't think that the token macro stuff should be integrated into the
core. There are other ways of generating parameter values to pass along, I
believe the EnvInject plugin is the way to go. Integrating Token Macro into
core is not going to happen.


On Tue, Aug 19, 2014 at 8:36 AM, Paul Sokolovsky <[email protected]
> wrote:

> On Tue, 19 Aug 2014 07:05:40 -0700
> Slide <[email protected]> wrote:
>
> > You are correct. Token macro expansion only happens if it is
> > explicitly used in the code that uses the value on the server side.
> > Most fields in Jenkins don't do token macro expansion. The EnvInject
> > may allow you to do something like what you want.
>
> Thanks for confirmation. Then, this looks like a bug for me. Well, on
> second thought, token macro expansion is provided by a plugin, while
> job params is a core feature. But well, lot of things were split from
> core in last versions of Jenkins, why features which are truly global
> and reusable can't go in opposite direction and be merged into core?
>
> Are there other concerns which I may be missing (security, whatever)
> with support for macro expansion in job params? Otherwise, I'll file a
> bug.
>
> Thanks for hint about EnvInject, I intended to look into it too. The
> issue, I wanted to wrote plugin-like functionality in Groovy. And
> indeed, it's possible and easy. But then integrating it into Jenkins in
> secure and user-friendly manner appear to cause more trouble and
> headache than writing a plugin in Java ;-(.
>
> >
> >
> > On Tue, Aug 19, 2014 at 6:19 AM, Paul Sokolovsky
> > <[email protected]
> > > wrote:
> >
> > > Hello,
> > >
> > > I'm trying to take a value as produced by some plugin's token macro
> > > support and inject it into job's build, so eventually it is
> > > available in slave's environment to a shell script.
> > >
> > > After some thinking, an obvious way to achieve that seems to make a
> > > job parametrized, and just set its default value to be token
> > > expansion. For definitiveness, let's take Scriptler token macro
> > > support as an example (
> > >
> https://wiki.jenkins-ci.org/display/JENKINS/Scriptler+Plugin#ScriptlerPlugin-TokenMacroSupport
> > > ).
> > > So, for a job I define parameter "PARAM" with default value
> > > "${SCRIPTLER, scriptId="superscript.groovy"}".
> > >
> > > However, after running such job, I see that PARAM gets literal
> > > value of "${SCRIPTLER, scriptId="superscript.groovy"}", i.e. token
> > > macro expansion doesn't happen.
> > >
> > > It actually took me quite some effort to be able to see macro
> > > expansion in works - to make sure it works in general (I filed
> > > https://issues.jenkins-ci.org/browse/JENKINS-24325 along the way).
> > > It does - there're contexts in which the above macro properly
> > > expands.
> > >
> > > That makes me to conclude that token macro expansion doesn't work in
> > > job parameters. Am I doing something wrong? Any suggestions to
> > > resolve this?
> > >
> > >
> > > Thanks,
> > >
> > > --
> > > Best Regards,
> > > Paul
> > >
> > > Linaro.org | Open source software for ARM SoCs
> > > Follow Linaro: http://www.facebook.com/pages/Linaro
> > > http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog
> > >
> > > --
> > > 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].
> > > For more options, visit https://groups.google.com/d/optout.
> > >
> >
> >
> >
>
>
>
> --
> Best Regards,
> Paul
>
> Linaro.org | Open source software for ARM SoCs
> Follow Linaro: http://www.facebook.com/pages/Linaro
> http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog
>
> --
> 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].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to