Refer to
https://jenkins.io/doc/pipeline/steps/workflow-durable-task-step/#code-sh-code-shell-script
for
the details.

The specific question you're asking is answered by an example at
https://jenkins.io/doc/pipeline/examples/#gitcommit .  You need "
returnStdout: true".

Mark Waite

On Thu, Apr 27, 2017 at 9:16 AM Kenneth Johansson <
[email protected]> wrote:

> How do I find out what functions exist that can be used from a groovy
> script and how to use them ??
>
> like how to get the shell script output from a shell command into a
> variable.
>
> so the sh command is in basically all  examples written as "sh
> 'command'" but there is another way also so that its possible to get the
> output into a a string but where is this documented. I do not need
> proper docs I can read the source but I cant even find out where this
> code exists. It's very hard to get up to speed with this stuff when the
> only way to find out things if is someone has done a blog post and have
> some code in it.
>
> --
> 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/422dd162-7ca7-03a7-1dc6-4fddaa83f6dc%40inteno.se
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAO49JtFt8mLVo%3Dz8UJfc1pT4o4nJ5zpEy8-_cS83FPJko%2BZ-_w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to