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

Parallel stages in declarative pipelines don't work with docker agents

      If you have a Jenkinsfile with a top-level agent { docker {}} section you and use parallel {} around nested stages, all the stages will run on the same slave, at the same time (even if the slave has only one executor).

      If you add agent { docker {}} to each stage, they will run on other slaves, but docker run will only be invoked once, for the top-level and never again. Docker stop will run for all stages though.

      If you remove the top-level agent { docker {}} and only leave it in stages, docker run will never be invoked.

          [JENKINS-47103] Parallel stages in declarative pipelines don't work with docker agents

          wknapik wknapik created issue -
          Andrew Bayer made changes -
          Link New: This issue duplicates JENKINS-46831 [ JENKINS-46831 ]
          Andrew Bayer made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Liam Newman made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            abayer Andrew Bayer
            wknapik wknapik wknapik
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: