-
New Feature
-
Resolution: Fixed
-
Major
-
None
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.
- relates to
-
JENKINS-40695 Allow lightweight or remote checkout for Groovy libraries
- Resolved
-
JENKINS-55341 Unnecessary git fetch calls to remote repository and storing separate library in every pipeline workspace and in every build dir when using git tags
- Open
-
JENKINS-60969 @libs pseudo-workspace collision due to branch name truncation
- In Progress
-
JENKINS-65612 Support for immediately cleaning @libs workspaces
- Open
-
JENKINS-70870 Save libraries as JAR files rather than unpacked
- In Review
-
JENKINS-65829 Workspace Cleanup does not delete @libs directories created by libraries
- Closed
- links to