Debugging Groovy Scripted Pipelines in Jenkins

I'm developing Jenkins pipelines as Groovy scripts (scripted pipelines, not declarative), and having a real hard time. Jenkins is always very generic regarding syntax/semantic errors, outputting stacks like below:

groovy.lang.MissingPropertyException: No such property: caughtError for class: groovy.lang.Binding
at groovy.lang.Binding.getVariable(Binding.java:63)
at

So I have to figure where the error is completely by myself, inspecting line per line of code. Is there a better way to debug it? What you guys use to do?

1

1 Answer

I have seen this post, Which describe how to debug a groovy script for jenkins pipeline. it's clearly describe the steps how to do it.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest