replace variable to real value in build step

24 views
Skip to first unread message

Shurik

unread,
Apr 12, 2016, 7:25:06 AM4/12/16
to Jenkins Developers
Hi,

I write build step plugin that has few parameters in the configuration page.

I want to support the option to use the "This build is parameterized" parameters in my configuration.

How I can translate the $PARAM to the real value via code.

e.g.

I added the FILE_LOCATION string parameter in "This build is parameterized" option.
In my plugin configuration parameter i set as below
    FILE=${FILE_LOCATION}

Now in code I want translate the ${FILE_LOCATION} to the real value that user set when trigger the build.

Thanks,
Shurik
    

Robert Sandell

unread,
Apr 13, 2016, 8:58:42 AM4/13/16
to jenkin...@googlegroups.com
I think the best way is to use the Token Macro Plugin https://wiki.jenkins-ci.org/display/JENKINS/Token+Macro+Plugin

/B

--
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-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/73b944ab-f761-4ecd-8071-3ac3371ad15c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Robert Sandell
Software Engineer
CloudBees Inc.
Reply all
Reply to author
Forward
0 new messages