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

Docker Workflow demos: sh step on Docker image hangs if workspace is not writable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Blocker Blocker
    • docker-workflow-plugin
    • remote docker server
      docker-workflow-1.0

      A sample demo workflow script hangs infinitely on the shell step.
      Logs are available below, stackdump is attached.

      Workflow:

      docker.image('maven:3.3.3-jdk-8').inside {
        git url: "https://github.com/oleg-nenashev/ircbot.git"
        sh 'echo hello'
        //Same thing with mvn -B clean install'
      }
      

      Build log

      Started by user anonymous
      Running: Allocate node : Start
      Running on master in /Users/nenashev/Documents/cloudbees/demo/docker-traceability/work/jobs/test-example-1/workspace
      Running: Allocate node : Body : Start
      Running: Shell Script
      [workspace] Running shell script
      + docker inspect -f . maven:3.3.3-jdk-8
      .
      Running: Run build steps inside a Docker container : Start
      $ docker run -t -d -u 502:20 -w /Users/nenashev/Documents/cloudbees/demo/docker-traceability/work/jobs/test-example-1/workspace -v /Users/nenashev/Documents/cloudbees/demo/docker-traceability/work/jobs/test-example-1/workspace:/Users/nenashev/Documents/cloudbees/demo/docker-traceability/work/jobs/test-example-1/workspace:rw -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** maven:3.3.3-jdk-8 cat
      Running: Run build steps inside a Docker container : 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/oleg-nenashev/ircbot.git # timeout=10
      Fetching upstream changes from https://github.com/oleg-nenashev/ircbot.git
       > git --version # timeout=10
       > git -c core.askpass=true fetch --tags --progress https://github.com/oleg-nenashev/ircbot.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 eaa8c349f12288276e5c27fcef78c245bb41517a (refs/remotes/origin/master)
       > git config core.sparsecheckout # timeout=10
       > git checkout -f eaa8c349f12288276e5c27fcef78c245bb41517a
       > git rev-list eaa8c349f12288276e5c27fcef78c245bb41517a # timeout=10
      Running: Shell Script
      [workspace] Running shell script
      <<< hangs here
      

          [JENKINS-28821] Docker Workflow demos: sh step on Docker image hangs if workspace is not writable

          Oleg Nenashev created issue -
          Oleg Nenashev made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Oleg Nenashev made changes -
          Link New: This issue is related to JENKINS-28400 [ JENKINS-28400 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "PR 7 (Web Link)" [ 13101 ]
          Oleg Nenashev made changes -
          Assignee Original: Oleg Nenashev [ oleg_nenashev ] New: Jesse Glick [ jglick ]
          Oleg Nenashev made changes -
          Assignee Original: Jesse Glick [ jglick ]
          Jesse Glick made changes -
          Labels New: robustness
          Oleg Nenashev made changes -
          Status Original: In Progress [ 3 ] New: Open [ 1 ]
          Jesse Glick made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 163681 ] New: JNJira + In-Review [ 197278 ]
          CloudBees Inc. made changes -
          Remote Link New: This issue links to "CloudBees Internal OSS-543 (Web Link)" [ 18881 ]

            Unassigned Unassigned
            oleg_nenashev Oleg Nenashev
            Votes:
            3 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: