• Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • pipeline
    • Jenkins 1.609.3
      Workflow plugins 1.10
      Git plugin 2.4.0
      Git client plugin 1.19.0
      Brand new jenkins image with only the above installed: docker run -d -p 8080:8080 jenkins

      I stumbled across a way to hang a workflow, by creating and running the following script (it'll work fine with the equivalent freestyle job):

      node {
        git url:'https://github.com/jenkinsci/workflow-plugin.git', branch:'master'
        echo 'nope'
        sh 'git clean -fdx'
      }
      

      The following output is shown in the console:

      Started by user anonymous
      Running: Allocate node : Start
      Running on master in /var/jenkins_home/jobs/hangit/workspace
      Running: Allocate node : Body : Start
      Running: Git
       > git rev-parse --is-inside-work-tree # timeout=10
      Fetching changes from the remote Git repository
       > git config remote.origin.url https://github.com/jenkinsci/workflow-plugin.git # timeout=10
      Fetching upstream changes from https://github.com/jenkinsci/workflow-plugin.git
       > git --version # timeout=10
       > git -c core.askpass=true fetch --tags --progress https://github.com/jenkinsci/workflow-plugin.git +refs/heads/*:refs/remotes/origin/*
       > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
       > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
      Checking out Revision 101be9ca2431ec22e6e39b84d94d503852bb8272 (refs/remotes/origin/master)
       > git config core.sparsecheckout # timeout=10
       > git checkout -f 101be9ca2431ec22e6e39b84d94d503852bb8272
      First time build. Skipping changelog.
      Running: Print Message
      nope
      Running: Shell Script
      [workspace] Running shell script
      

      The workflow can be aborted manually, but as far as I can tell does not complete (though it hasn't been left overnight, so it might finish eventually).

          [JENKINS-30884] Workflow hangs on git clean after clone

          Sam Van Oort created issue -
          Jesse Glick made changes -
          Description Original: I stumbled across a way to hang a workflow, by creating and running the following script (it'll work fine with the equivalent freestyle job):

          {code:groovy}
          node {
            git url:'https://github.com/jenkinsci/workflow-plugin.git', branch:'master'
            echo 'nope'
            sh 'git clean -fdx'
          }
          {code}


          *The following output is shown in the console:*
          Started by user anonymous
          Running: Allocate node : Start
          Running on master in /var/jenkins_home/jobs/hangit/workspace
          Running: Allocate node : Body : Start
          Running: Git
           > git rev-parse --is-inside-work-tree # timeout=10
          Fetching changes from the remote Git repository
           > git config remote.origin.url https://github.com/jenkinsci/workflow-plugin.git # timeout=10
          Fetching upstream changes from https://github.com/jenkinsci/workflow-plugin.git
           > git --version # timeout=10
           > git -c core.askpass=true fetch --tags --progress https://github.com/jenkinsci/workflow-plugin.git +refs/heads/*:refs/remotes/origin/*
           > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
           > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
          Checking out Revision 101be9ca2431ec22e6e39b84d94d503852bb8272 (refs/remotes/origin/master)
           > git config core.sparsecheckout # timeout=10
           > git checkout -f 101be9ca2431ec22e6e39b84d94d503852bb8272
          First time build. Skipping changelog.
          Running: Print Message
          nope
          Running: Shell Script
          [workspace] Running shell script

          The workflow can be aborted manually, but as far as I can tell does not complete (though it hasn't been left overnight, so it might finish eventually).
          New: I stumbled across a way to hang a workflow, by creating and running the following script (it'll work fine with the equivalent freestyle job):

          {code}
          node {
            git url:'https://github.com/jenkinsci/workflow-plugin.git', branch:'master'
            echo 'nope'
            sh 'git clean -fdx'
          }
          {code}

          The following output is shown in the console:

          {code:none}
          Started by user anonymous
          Running: Allocate node : Start
          Running on master in /var/jenkins_home/jobs/hangit/workspace
          Running: Allocate node : Body : Start
          Running: Git
           > git rev-parse --is-inside-work-tree # timeout=10
          Fetching changes from the remote Git repository
           > git config remote.origin.url https://github.com/jenkinsci/workflow-plugin.git # timeout=10
          Fetching upstream changes from https://github.com/jenkinsci/workflow-plugin.git
           > git --version # timeout=10
           > git -c core.askpass=true fetch --tags --progress https://github.com/jenkinsci/workflow-plugin.git +refs/heads/*:refs/remotes/origin/*
           > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
           > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
          Checking out Revision 101be9ca2431ec22e6e39b84d94d503852bb8272 (refs/remotes/origin/master)
           > git config core.sparsecheckout # timeout=10
           > git checkout -f 101be9ca2431ec22e6e39b84d94d503852bb8272
          First time build. Skipping changelog.
          Running: Print Message
          nope
          Running: Shell Script
          [workspace] Running shell script
          {code}

          The workflow can be aborted manually, but as far as I can tell does not complete (though it hasn't been left overnight, so it might finish eventually).
          Jesse Glick made changes -
          Link New: This issue duplicates JENKINS-27152 [ JENKINS-27152 ]
          Jesse Glick made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 166011 ] New: JNJira + In-Review [ 197875 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]
          Andrew Bayer made changes -
          Labels Original: workflow New: pipeline workflow
          Andrew Bayer made changes -
          Labels Original: pipeline workflow New: pipeline

            Unassigned Unassigned
            svanoort Sam Van Oort
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: