On 2017-04-27 17:22, Mark Waite wrote:
Refer to https://jenkins.io/doc/pipeline/steps/workflow-durable-task-step/#code-sh-code-shell-script for the details.

How did you find that ?

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

well in this case I already know the answer the real question is actually how do I find out the answer in the fist place. how can I discover what functions exists ??
Now it feels like it is more a question of luck.

Mark Waite

On Thu, Apr 27, 2017 at 9:16 AM Kenneth Johansson <kenneth.johans...@inteno.se <mailto:kenneth.johans...@inteno.se>> 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 jenkinsci-users+unsubscr...@googlegroups.com
    <mailto:jenkinsci-users%2bunsubscr...@googlegroups.com>.
    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 jenkinsci-users+unsubscr...@googlegroups.com <mailto:jenkinsci-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtFt8mLVo%3Dz8UJfc1pT4o4nJ5zpEy8-_cS83FPJko%2BZ-_w%40mail.gmail.com <https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtFt8mLVo%3Dz8UJfc1pT4o4nJ5zpEy8-_cS83FPJko%2BZ-_w%40mail.gmail.com?utm_medium=email&utm_source=footer>.
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/72f3ade4-5e5b-322e-5209-fef8e36366ac%40inteno.se.
For more options, visit https://groups.google.com/d/optout.

Reply via email to