diff --git a/docs/modules/ROOT/pages/how-tos/configuring/prefetching-dependencies.adoc b/docs/modules/ROOT/pages/how-tos/configuring/prefetching-dependencies.adoc index 984e79f6..1b85dd27 100644 --- a/docs/modules/ROOT/pages/how-tos/configuring/prefetching-dependencies.adoc +++ b/docs/modules/ROOT/pages/how-tos/configuring/prefetching-dependencies.adoc @@ -21,6 +21,9 @@ For every build, Cachi2 generates a software bill of materials (SBOM) where all |xref:npm[npm] |`JavaScript` +|xref:yarn[yarn] +|`JavaScript` + |xref:bundler[bundler] |`Ruby` @@ -301,6 +304,31 @@ spec: * From the {ProductName} *Applications* view, go to *Activity > Latest commits*. //include::../partials/con_hermetic_verification.adoc[] +== [[yarn]]Enabling prefetch builds for `yarn` + +Supported versions: 1.x and 3.x. Cachi2 automatically detects the version of `yarn` and fetches any dependencies you declare in your `package.json` and `yarn.lock` project files. + +.Prerequisites + +* You have an up-to-date `yarn.lock` file in your source repository. To make sure that you have the latest `yarn.lock` file, or to create a lockfile, run the `yarn install` command. If `yarn.lock` is not up-to-date, Cachi2 will not fetch the dependencies. + +.Procedure + +To prefetch dependencies for a component build, complete the following steps: + +. Go to the `.tekton` directory and find the `.yaml` files related to the `*pull request*` and `*push*` processes. +. Configure the hermetic pipeline by adding the following parameters in both `.yaml` files: + ++ +[source,yaml] +---- +spec: + params: + - ... + - name: prefetch-input + value: '{"type": "yarn", "path": "."}' +---- + == [[bundler]]Enabling prefetch builds for `bundler` .Prerequisites