Skip to content

Commit d486e87

Browse files
committed
prefetching-dependencies: Add bundler (Ruby) to supported package managers
Signed-off-by: Michal Šoltis <[email protected]>
1 parent f13da84 commit d486e87

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

docs/modules/ROOT/pages/how-tos/configuring/prefetching-dependencies.adoc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ For every build, Cachi2 generates a software bill of materials (SBOM) where all
2121
|xref:npm[npm]
2222
|`JavaScript`
2323

24+
|xref:bundler[bundler]
25+
|`Ruby`
26+
2427
|xref:rpm*[rpm]
2528
|`N/A`
2629

@@ -298,6 +301,33 @@ spec:
298301
* From the {ProductName} *Applications* view, go to *Activity > Latest commits*.
299302
//include::../partials/con_hermetic_verification.adoc[]
300303

304+
== [[bundler]]Enabling prefetch builds for `bundler`
305+
306+
.Prerequisites
307+
308+
You have a `Gemfile` and a `Gemfile.lock` file in your repository that lists all the dependencies. The `Gemfile.lock` file must be up-to-date and must contain the correct versions of all the gems. To ensure that the `Gemfile.lock` file is up-to-date, run the `bundle install` command.
309+
310+
.Procedure
311+
312+
To prefetch dependencies for a component build, complete the following steps:
313+
314+
. Go to the `.tekton` directory and find the `.yaml` files related to the `*pull request*` and `*push*` processes.
315+
. Configure the hermetic pipeline by adding the following parameters in both `.yaml` files:
316+
317+
+
318+
[source,yaml]
319+
----
320+
spec:
321+
params:
322+
- ...
323+
- name: prefetch-input
324+
value: '{"type": "bundler", "path": ".", "allow_binary": "false"}' <1>
325+
----
326+
<1> The `*allow_binary*` parameter specifies whether to allow gems for specific platforms. By default, the value is `false`. If you want to allow gems for specific platforms, set the value to `true`.
327+
328+
. Create a pull request by committing your changes to the repository of the component.
329+
. Review and merge the pull request.
330+
301331
== [[rpm]]Enabling prefetch builds for `rpm`
302332

303333
Cachi2 has a dev-preview package manager capable of fetching `rpm` dependencies. This requires the use of a pair of `rpms.in.yaml` and `rpms.lock.yaml` files to be committed to your repository. You write a `rpms.in.yaml` file and the link:https://github.com/konflux-ci/rpm-lockfile-prototype?tab=readme-ov-file#what-is-this[rpm-lockfile-prototype] CLI tool resolves that to produce a `rpms.lock.yaml` file. Cachi2 fetches those specific rpms and enables your build to install them without network access.

0 commit comments

Comments
 (0)