On Saturday, 11 February 2017 00:49:42 UTC-5, David Karr wrote:
> I'm seeing some odd behavior with "println" calls in shared library 
> methods, and a perhaps related issue with printing a shared library object 
> in a Jenkinsfile.

Nice to see an answer to this by Jon S a month later where he suggested to 
pass the "this" reference to the "src" class instance (apparently it has an 
interface Script).  Calling script.echo("...") in a method of that instance 
will work.  (Without binding to the script object, my bare "echo" in an 
"src" instance method resulted in a silent termination of the step).

Jon S also suggested to add a @NonCPS annotation to the "src" instance 
methods and declare the "src" class Serializable to allow executing the 
method from the context of a slave node.


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 
For more options, visit https://groups.google.com/d/optout.

Reply via email to