Edson Marquezani Filho
Edson Marquezani Filho

Reputation: 2696

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?

Upvotes: 32

Views: 44357

Answers (1)

Hatim
Hatim

Reputation: 1172

I have seen this post, http://notes.asaleh.net/posts/debugging-jenkins-pipeline/ Which describe how to debug a groovy script for jenkins pipeline. it's clearly describe the steps how to do it.

Upvotes: 19

Related Questions