-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
Jenkins 1.596.1
Workflow plugin 1.4
Xubuntu 14.04
Java(TM) SE Runtime Environment (build 1.7.0_76-b13)
We start by creating a class in the groovy script but we've also tried having another groovy script as well as create the class in Java.
When we then declare create an object with the class "def sc = new SimpleClass("Nisse")" the workflow will exit with an error code.
The part "echo "this is the end"" will not be executed.
If I remove the def sc = new ... then the job will exit and all the echo commands will run.
workflow.groovy
class SimpleClass{ def name = "" public SimpleClass(def name){ this.name = name } public def greet(){ return "Hello " + this.name } } def sc = new SimpleClass("Nisse") echo sc.greet() node("linux || windows") { echo "enter node" ws("rb-sb-revision") { echo "Node + WS 1" } echo "exit WS" } echo "this is the end"
- is duplicated by
-
JENKINS-27850 workflow job do not print a backtrace when failing
- Resolved
- is related to
-
JENKINS-25925 More polite reporting of NotSerializableException
- Open
- links to