It doesn't look like the envinject plugin has any sort of dependency on the
token-macro plugin, which means you can't use the FILE token there.

On Thu, Oct 24, 2019 at 11:16 PM Ilia Basin <[email protected]> wrote:

> Hi.
> I'm trying to use the syntax `${FILE,path=foo.txt}` to  introduced in
> Token Macro Plugin 1.11. My plugin version is 1.12.1
> In what context can this be used? My project is a freestyle project. It
> creates foo.txt, then I have the EnvInject step with the following:
>
>     AAA=${FILE,path=foo.txt}
>
> and then the shell step:
>
>     echo "AAA=$AAA"
>
> Here's the console output:
>
>     [basintest] $ /u01/jenkins/jenkins_shell -xe
> /tmp/hudson8306494744167210672.sh
>     + . /tmp/hudson8306494744167210672.sh
>     ++ cat foo.txt
>     aaa
>     [EnvInject] - Injecting environment variables from a build step.
>     [EnvInject] - Injecting as environment variables the properties
> content
>     AAA=${FILE,path=foo.txt}
>
>     [EnvInject] - Variables injected successfully.
>     [basintest] $ /u01/jenkins/jenkins_shell -xe
> /tmp/hudson6182970742482538021.sh
>     + . /tmp/hudson6182970742482538021.sh
>     ++ echo 'AAA=${FILE,path=foo.txt}'
>     AAA=${FILE,path=foo.txt}
>     Finished: SUCCESS
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" 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-users/c745bd95-a598-40dc-8c9d-2fd63edc6070%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/c745bd95-a598-40dc-8c9d-2fd63edc6070%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Website: http://earl-of-code.com

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" 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-users/CAPiUgVew88faAmA2L5AMWh96fsebveOyHZczOMEZOsvOSu_TJQ%40mail.gmail.com.

Reply via email to