Parallel Docker pipeline

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Minor
    • Component/s: docker-workflow-plugin
    • None
    • Environment:

      docker withRun does not create separate containers when run within a parallel block. The output of the first step is shown in all steps.

      In the following example, "make frontend" fails and its output is repeated in the shell steps of both frontend and backend steps.

      node {
        def runCmd = { cmd ->
              docker.image("ubuntu:latest").withRun("-t -v /home/mn:/src/mn") { c ->
                  sh "docker exec ${c.id} ${cmd}"
              }
          }
        
        stage 'Build'
        runCmd 'npm install'
        parallel (
          "frontend": {
            runCmd "make frontend"
          },
          "backend": {
            runCmd "make backend"
          }
        )
      }
      

            Assignee:
            Jesse Glick
            Reporter:
            Shauvik Roy Choudhary
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: