It is not inherently necessary for Pipeline Groovy libraries to be checked out into the workspace/xxx@libs/ subdirectory at the job level, or updated after the initial checkout, and then copied into the build. It suffices to check out the SCM directly into the build directory.

      • Reduces disk usage somewhat. While there are typically many more build directories, each with their own copy of the library, than the one shared checkout, the shared checkout will include SCM metadata (like the .git/ directory) as well as any files not needed at runtime (documentation, tests, unrelated projects).
      • May avoid contention in heavily concurrent jobs, since no global exclusive lock is needed during SCM operations.
      • Is generally simpler, bypassing some security and other consistency issues associated with maintaining a checkout shared between builds.

      The downside is of course that a fresh checkout tends to be slower than an update operation. In the case of Git, the overhead can be minimized using shallow clones and some related options, especially since there is no requirement that the checkout be configured to support subsequent pulls.

          [JENKINS-70869] Option to bypass workspace checkout of library

          Jesse Glick created issue -
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jesse Glick made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Jesse Glick made changes -
          Issue Type Original: Improvement [ 4 ] New: New Feature [ 2 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "pipeline-groovy-lib-plugin #55 (Web Link)" [ 28551 ]
          Jesse Glick made changes -
          Released As New: https://github.com/jenkinsci/pipeline-groovy-lib-plugin/releases/tag/656.va_a_ceeb_6ffb_f7
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-65829 [ JENKINS-65829 ]
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-65612 [ JENKINS-65612 ]
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-60969 [ JENKINS-60969 ]
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-55341 [ JENKINS-55341 ]
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-40695 [ JENKINS-40695 ]

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: