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

[sh command] Job hangs when the pipeline scripts runs simple sh command

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • pipeline
    • None
    • Pipeline script runs on Mac OS slave

      I have in my Jenkins job a simple Jenkinsfile script that looks as follow:

       

       

      pipeline {
          agent {
              label 'boaz-mac-machine'
          }
           stages {
              stage('Setup automation framework') {
                  steps {
                      echo 'before bash command'
                      sh "ls"
                      echo 'after bash command'
                  }
              }
          }
      }
      

       

       

      The problem is that the pipeline stuck/hang on the line where I call sh "ls".

      My slave machine is a Mac OS 

          [JENKINS-64027] [sh command] Job hangs when the pipeline scripts runs simple sh command

          Boaz Warshawsky created issue -
          Boaz Warshawsky made changes -
          Description Original: I have in my Jenkins job a simple Jenkinsfile script that looks as follow:

           

           
          {code:java}
          pipeline {
              agent {
                  label 'boaz-mac-machine'
              }
               stages {
                  stage('Setup automation framework') {
                      steps {
                          echo 'before bash command'
                          sh ''ls''
                          echo 'after bash command'
                      }
                  }
              }
          }
          {code}
           

           

          The problem is that the pipeline stuck/hang on the line where I call *sh "ls"* .
          New: I have in my Jenkins job a simple Jenkinsfile script that looks as follow:

           

           
          {code:java}
          pipeline {
              agent {
                  label 'boaz-mac-machine'
              }
               stages {
                  stage('Setup automation framework') {
                      steps {
                          echo 'before bash command'
                          sh "ls"
                          echo 'after bash command'
                      }
                  }
              }
          }
          {code}
           

           

          The problem is that the pipeline stuck/hang on the line where I call *sh "ls"* .

          Hi timja, can you please help me with the issue above? 
          I am stuck on it for already 4 days, and its quite simple thing I think. 

          Boaz Warshawsky added a comment - Hi timja , can you please help me with the issue above?  I am stuck on it for already 4 days, and its quite simple thing I think. 
          Boaz Warshawsky made changes -
          Description Original: I have in my Jenkins job a simple Jenkinsfile script that looks as follow:

           

           
          {code:java}
          pipeline {
              agent {
                  label 'boaz-mac-machine'
              }
               stages {
                  stage('Setup automation framework') {
                      steps {
                          echo 'before bash command'
                          sh "ls"
                          echo 'after bash command'
                      }
                  }
              }
          }
          {code}
           

           

          The problem is that the pipeline stuck/hang on the line where I call *sh "ls"* .
          New: I have in my Jenkins job a simple Jenkinsfile script that looks as follow:

           

           
          {code:java}
          pipeline {
              agent {
                  label 'boaz-mac-machine'
              }
               stages {
                  stage('Setup automation framework') {
                      steps {
                          echo 'before bash command'
                          sh "ls"
                          echo 'after bash command'
                      }
                  }
              }
          }
          {code}
           

           

          The problem is that the pipeline stuck/hang on the line where I call *sh "ls"*.

          My slave machine is a Mac OS 
          penchal made changes -
          Comment [ If you put screenshot of the console its helpful. ]

          Kunal added a comment -

          2020 bug still open? I am also facing the same issue. The job gets stuck when run from Jenkins, running the steps from terminal works perfectly fine.

          Kunal added a comment - 2020 bug still open? I am also facing the same issue. The job gets stuck when run from Jenkins, running the steps from terminal works perfectly fine.
          Mark Waite made changes -
          Osaid made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]
          Mark Waite made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Closed [ 6 ] New: Reopened [ 4 ]
          Mark Waite made changes -
          Status Original: Reopened [ 4 ] New: Open [ 1 ]

            Unassigned Unassigned
            boaz_warshawsky Boaz Warshawsky
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: