Hello,
I'm trying to print to the console output tab of a running pipeline
project from a global pipeline library. My understanding is that the
only way to do this is via the echo step.
What I have is a bunch of more "sophisticated" Groovy code (such as -
*gasp!* - loops) that doesn't work under the CPS interpreter, so I
have *most* of my global pipeline library's methods annotated with
@NonCPS.
However, I have a CPS-interpreted class that looks like this:
class Stepper implements Serializable {
static def steps
static def log(o) { Stepper.steps.echo o; }
}
When I call Stepper.log "hi" from other classes in the global pipeline
library (mostly from @NonCPS methods), it works fine the *first* time.
But every subsequent call to Stepper.log does not print to the console
output.
Interestingly, the job succeeds; no exception is thrown on the JVM
stdout/stderr; and no complaining messages are printed to the console
output. It just... silently eats my echo steps.
Am I doing something wrong, or is this by design?
My environment is:
Jenkins 2.19.1 running on Oracle JDK 8u112 64-bit on Windows 10
64-bit. Started with java -jar jenkins.war
Thanks,
Sean
--
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/CAPAActer68TK5w6U9qfoiqs6g9bWwj7QO-YeRhhypJqw4pj6Jw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.