Parallel Docker pipeline

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Minor
    • Component/s: docker-workflow-plugin
    • 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
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: