Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-27458

Serialization error at end of flow not reported properly in build log, only Jenkins log

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor 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"
      

            kohsuke Kohsuke Kawaguchi
            hanabishi Marcus Jacobsson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: