@@ -650,13 +650,50 @@ available and in the PATH for the builder image, or an error will result.
650650
651651.. _cachito-usage :
652652
653- Fetching source code from external source using cachito
654- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
653+ Fetching source code from external source
654+ -----------------------------------------
655+
656+ OSBS allows multiple providers for remote sources, namely Cachito and Hermeto.
657+
658+ Users can chose which provider to use by configuration in ``container.yaml ``:
659+
660+ .. code-block :: yaml
661+
662+ ---
663+ remote_sources_version : 2
664+
665+
666+ .. list-table :: Remote source provider
667+ :widths: 25 25
668+ :header-rows: 1
669+
670+ * - Provider
671+ - Numerical value
672+ * - Cachito
673+ - 1
674+ * - Hermeto
675+ - 2
676+
677+
678+ When ``remote_sources_version `` isn't provided, default version will be used.
679+ This is configurable by admins.
680+
681+ Cachito
682+ ~~~~~~~
655683
656684As described in :ref: `cachito-integration `, it is possible to use cachito to
657685download a tarball with an upstream project and its dependencies and make it
658686available for usage during an OSBS build.
659687
688+ .. note :: In order for these entries to be used, both OSBS Cachito integration and usage
689+ of ``remote_sources `` need to be allowed in the OSBS Instance configuration. See
690+ :ref: `configure-cachito-instance ` and :ref: `allow-multiple-remote-sources `.
691+
692+ Hermeto
693+ ~~~~~~~
694+
695+ Hermeto runs as part of OSBS pipeline, it's not an external service.
696+ For compatibility reasons, majority of options are same as with Cachito.
660697
661698remote_sources
662699~~~~~~~~~~~~~~
@@ -665,9 +702,7 @@ A list of remote_source maps, each with an additional name parameter. For each
665702remote_source, OSBS will request a source archive bundle from cachito. The keys
666703accepted here are described below.
667704
668- .. note :: In order for these entries to be used, both OSBS cachito integration and usage
669- of remote_sources need to be allowed in the OSBS Instance configuration. See
670- :ref: `configure-cachito-instance ` and :ref: `allow-multiple-remote-sources `.
705+
671706
672707name
673708 Serves as a unique identifier for the remote source.
@@ -685,21 +720,20 @@ remote_source
685720
686721 pkg_managers
687722 A list of package managers to be used for resolving the upstream project
688- dependencies. If not provided, Cachito will assume ``gomod `` due to backward
723+ dependencies. If not provided, Cachito/Hermeto will assume ``gomod `` due to backward
689724 compatibility reasons, however, this default could be configured differently
690725 on different Cachito deployments (make sure to check with your Cachito
691- instance admins). Finally, if this is set to an empty array (``[] ``), Cachito
726+ instance admins). Finally, if this is set to an empty array (``[] ``), Cachito/Hermeto
692727 will provide the sources with no package manager magic. In other words, no
693728 environment variables, dependencies, or extra configuration will be provided
694729 with the sources.
695730
696- The full information about supported package managers is in the
697- `upstream Cachito package manager documentation
698- <https://github.com/release-engineering/cachito#package-managers> `_.
731+ Supported package managers are: ``gomod ``, ``rubygems ``, ``pip ``, ``yarn ``,
732+ ``npm ``, ``git-submodule ``
699733
700734 flags
701- List of flags to pass to the cachito request. See the cachito _ documentation
702- for further reference.
735+ List of flags to pass to the Cachito/Hermeto request.
736+ See the cachito _ and hermeto _ documentation for further reference.
703737
704738 packages
705739 A map of package managers where each value is an array of maps describing
@@ -738,11 +772,11 @@ where ``{name}`` refers to the name of a given remote source as defined in conta
738772The dependencies can be correspondingly found at ``$REMOTE_SOURCES_DIR/{name}/deps ``
739773
740774OSBS also creates a ``$REMOTE_SOURCES_DIR/{name}/cachito.env `` bash script with exported
741- environment variables received from each cachito request (such as ``GOPATH ``,
775+ environment variables (such as ``GOPATH ``,
742776``GOCACHE `` for gomod package manager and ``PIP_CERT ``, ``PIP_INDEX_URL `` for pip).
743777Users should use the following command in the Dockerfile to set all required variables::
744778
745- RUN source $REMOTE_SOURCES_DIR/{name}/cachito.env
779+ RUN source $REMOTE_SOURCES_DIR/{name}/cachito.env # filename is compatible with Hermeto
746780
747781Note that ``$REMOTE_SOURCES_DIR `` is a build arg, available only in build time.
748782Hence, for cleaning up the image after using the sources, add the following
@@ -751,15 +785,14 @@ line to the Dockerfile after the build is complete::
751785 RUN rm -rf $REMOTE_SOURCES_DIR
752786
753787``$REMOTE_SOURCES `` is another build arg, which points to the directory that
754- contains extracted tar archives provided by cachito in the buildroot workdir.
788+ contains extracted remote source tar archives in the buildroot workdir.
755789
756- .. note :: To better use the cachito provided dependencies, a full gomod
757- supporting Golang version is required. In other words, you should use Golang
758- >= 1.13
759790
760791Replacing project dependencies with cachito
761792~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
762793
794+ .. note :: Hermeto doesn't support replacements.
795+
763796Cachito also provides a feature to allow users to replace a project's
764797dependencies with another version of that same dependency or with a completely
765798different dependency (this is useful when you want to use a patched fork for a
@@ -797,7 +830,8 @@ parameters, the same option should be specified multiple times in ``koji`` or
797830the ``osbs `` CLI. This was done to keep the consistency with the similar option
798831to specify yum repository URLs in each particular CLI.
799832
800- .. _cachito : https://github.com/release-engineering/cachito
833+ .. _cachito : https://github.com/containerbuildsystem/cachito
834+ .. _hermeto : https://github.com/hermetoproject/cachi2
801835
802836.. _content_sets.yml :
803837
0 commit comments