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

Jenkins pipeline stucked infinity when closure return from class run

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Critical
    • Resolution: Unresolved
    • Component/s: pipeline
    • Labels:
      None
    • Environment:
    • Similar Issues:

      Description

      When I run closure that returned by class in Jenkins pipeline, Jenkins stucked in shell command like below.

       

      The script is

       

      class Device
      {
      def context

      public Device(context)

      { this.context = context }

      @NonCPS
      def buildDriver()
      {
      return ({
      context.stage("Build Driver")
      {
      context.script

      { context.print("111111111111") context.sh("pwd;") context.print("222222222222") context.sh("ls -al") context.print("333333333333") }

      }

      })
      }
      }

      dev = new Device(this)

      pipeline
      {
      agent any
      stages
      {
      stage("main stage")
      {
      steps
      {
      script

      { print("start script") dev.buildDriver().run() }

      }
      }

      }
      }

       

      {{}}

      I think when finish processing shell command, PC is not back to previous pointer.. Just stay in it.. How can I resolve this issue

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            munga0828 hyunjun kim
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: