Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline Shared Libraries - Expanding details for Cache Retrievals #5375

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
41 changes: 41 additions & 0 deletions content/doc/book/pipeline/shared-libraries.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,47 @@ It is best to refer to *Pipeline Syntax* for the precise syntax for your SCM.

Note that the library version _must_ be specified in these cases.

=== Caching for Quick Retrievals

The plugin allows caching to be enabled for quick retrievals. One can configure `"Versions to exclude"` and
`"Versions to include"`. The mechanism for both is very similar, however, the use-cases differ as below:

==== Versions to exclude

This feature allows `exclusion` of specific versions from caching. It works great when you want to allow multiple
versions to cache, however, exclude one or more of them from caching.

It allows specifying substrings or complete version names as shown in the example below:

* Excludes the version `feature/versions_to_exclude` from caching.
* Excludes any versions with the substring `test/` from caching (eg:- test/feature1).

image::pipeline/versions-to-exclude.png["Versions to Exclude", role=center]

==== Versions to include

This feature allows `inclusion` of only specific versions for caching. It is really helpful when you have many versions
and require caching to be enabled only on selective versions. If nothing is specified in this block,
it would by default enable caching.

It allows specifying substrings or complete version names as shown in the example below:

* Includes the version `feature/versions_to_include` to enable caching.
* Includes any versions with the substring `test/` to enable caching (eg:- test/feature1).

image::pipeline/versions-to-include.png["Versions to Include", role=center]


[NOTE]
====
`Versions to exclude` will always take precedence over `Versions to include`.
In the example below, even though the same version is mentioned in both the blocks, it would be
excluded from caching.
====

image::pipeline/versions-mention-conflict.png["Versions to Specify Conflict", role=center]


== Writing libraries

At the base level, any valid
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.