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

Custom workspace-volume

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • kubernetes-plugin
    • None

      Currently there is always a mount of an emptyDir-volume in /home/jenkins. This comes automatically from plugin code.

      Because an emptyDir-volume is not persistent the agent has to download the full sources from the Git repository every time a build is started. Afterwards the downloaded sources are thrown away.

      It would be nice to have the opportunity to choose a volume that is mounted as workspace-volume so you could pick your own nfs-volume which includes the workspace with all downloaded projects.

      With a persistent workspace like that, the Git checkout would only update the sources, saving a lot of build time and network traffic.

      In addition with a nfs-volume we could have a workspace shared across all hosts and used by many agents at the same time (RWX access), saving storage and avoiding conflicts compared to a persistent-volume.

      Currently defining a volume in a scripted pipeline with mountpath /home/jenkins in the podTemplate resolves in java.nio exceptions and the plugin code says it is simply ignored.

       

      My suggestion: if the podTemplate defines a volume which is mounted in /home/jenkins it replaces the emptyDir otherwise mounted by plugin code.

       

      If there already is a way to mount a custom workspace-volume which I somehow overlooked please let me know.

            csanchez Carlos Sanchez
            thop789 Thore Paetsch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: