Re: Getting "java.io.NotSerializableException" exception in Jenkins pipeline, groovy.

2016-11-14 Thread Donald Morton
Here are some references for you: https://support.cloudbees.com/hc/en-us/articles/230612967-Pipeline-The-pipeline-even-if-successful-ends-with-java-io-NotSerializableException https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md#serializing-local-variables

Re: Getting "java.io.NotSerializableException" exception in Jenkins pipeline, groovy.

2016-11-14 Thread Thomas Keller
IIRC objects used in pipelines need to be able to get serialized, because the build should be pausable and resumable at any time. Try to refactor the AntBuilder object creation and call into a groovy method and annotate this method with @NonCPS -- You received this message because you are

Getting "java.io.NotSerializableException" exception in Jenkins pipeline, groovy.

2016-11-13 Thread Ganesh Kumbhar
Hello All, I am new to Jenkins pipeline and recently started to use it for my project build. So, from Jenkins file I am calling a method from other .groovy file which is simple script having some functions defined and in those functions I am creating antbuilder object -> "@Field AntBuilder