For something like a freestyle plugin, I think you need to use the token
macro plugin - https://wiki.jenkins.io/display/JENKINS/Token+Macro+Plugin
for pipeline, groovy will process the string before it gets to your code

On Mon, Oct 21, 2019 at 12:30 AM Tal Yanai <[email protected]> wrote:

> Hi,
>
> Suppose I have made a plugin implementation (a step) that asks the user
> for a location (path) to a file on the disk.
>
> When the user supply the value (using the job's configuration) he is using
> Jenkins variables/params such as ${JOB_NAME} as part of the path he supply.
>
> So for example, an input can be looked like:
> /home/john/${JOB_NAME}/${BUILD_NUMBER}
>
> Is there any Java library that know to return back the real value behind
> such input, so that I can farther user the real value within the plugin
> Java code?
>
> Thanks,
>
> Tal.
>
> --
> 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/a051d1b6-2ff7-4d93-846d-8bbcd426ef38%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/a051d1b6-2ff7-4d93-846d-8bbcd426ef38%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAG%3D_DusaKaQ8863NUecCD%2BZYW_Q4WZsPg148EnwTqPGeM%2B%3DQZw%40mail.gmail.com.

Reply via email to