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

Concurrent builds on docker slaves


      I work with Jenkins docker agents (slaves)
      And i map the docker slave build workspace between the container and the host in order to be able to path Artifacts to the downstream jobs.

      in Jenkins Configuration - Docker Cloud Details - Container settings:

       Volumes /var/lib/jenkins:/var/lib/jenkins 

      This works fine for a single build , The problem starts when i run concurrent builds,
      They are all mapped to the same workspace on the Docker host and interfering each other.
      What would be the best practice when using docker slaves and mapping workspace as a volume ?

      I wouldn't like to use $CustomWorkspace or coping artifacts during the build as this is hard to manage and purge.
      Can't run concurrent builds:  I would expect Docker plugin to act like the Jenkins regular slave approach of adding @2 to a second concurrent build but this is not the behavior when running concurrent builds on docker slaves

            csanchez Carlos Sanchez
            v352179 v352179 nwytg
            0 Vote for this issue
            2 Start watching this issue