hi Jesse,

Thank you for the input.

Defining environment variables should be a good solution for my case.

thanks!
Long


On Mon, Jun 21, 2021 at 9:29 AM Jesse Glick <jgl...@cloudbees.com> wrote:

> Beware that returning a value from a `Step` means that your step cannot be
> used naturally in Declarative Pipeline (only by “cheating” with a `script`
> block). If values need to be passed to other parts of a build, it may be
> better to use a block-scoped step and define environment variables (this
> can be done either in a first-class `Step` or in a `SimpleBuildWrapper`),
> though that assumes plain `String`s rather than structured objects:
>
> yourPlugin(param1: 'one', param2: 'two') {
>   sh 'echo using $VERSION from $REPO'
> }
>
> --
> 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-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr0XBMiy-%2BHwnVZCB6GRLym8oeUZ%3DpM0f5Q5mhxgK3rE3g%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr0XBMiy-%2BHwnVZCB6GRLym8oeUZ%3DpM0f5Q5mhxgK3rE3g%40mail.gmail.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 jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANDLext%2BDX-PZqCxwySacU4jDDCmQ9yNJ56ZdzBZ%2BDDRufhxew%40mail.gmail.com.

Reply via email to