Pipeline step return values can be captured.

Refer to "
https://github.com/MarkEWaite/jenkins-bugs/blob/e47d74ea8185c24d9c9531b7a126ae4a8fadef56/Jenkinsfile#L39";
for an example of the return value of "checkout" being assigned and used.

Ramanathan, "findbugs" is a step added by the findbugs plugin.  It was
added in findbugs plugin version 4.70.

I don't know if the findbugs step returns a value you could use.  I thought
it had settings which would mark the build as stable or unstable depending
on the detection of findbugs warnings.  The Jenkins plugin development
infrastructure can run findbugs as part of plugin continuous integration,
and marks the build unstable when a findbugs warning is detected.

Mark Waite

On Thu, Nov 30, 2017 at 5:02 AM Ramanathan Muthaiah <rus.cah...@gmail.com>
wrote:

> Is it possible to capture the return value from pipeline step?
>>
>> ex:
>> def result = findbugs(pattern: '**/target/**/findbugsXml.xml')
>> echo result
>>
>
> To store cmd status or output, you should use sh(). You will find code
> snippets in this link, https://jenkins.io/doc/pipeline/examples/
>
> BTW, Jenkins Pipeline doc has step called, "findFiles" but there is
> nothing like, findbugs. Is that your custom function?
>
> /Ram
>
>
> --
> 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/fc1b0b4e-bb5b-4f23-b408-ab9965d8692b%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/fc1b0b4e-bb5b-4f23-b408-ab9965d8692b%40googlegroups.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/CAO49JtEycsvijKPUWERq%2BhtEpErkGs%2BMYEzCw6PAVDRKSj8X_w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to