Added documentation for static contexts

Signed-off-by: Martin Curlej <mcurlej@redhat.com>
This commit is contained in:
Martin Curlej
2020-09-15 11:20:15 +02:00
parent 29c49dc338
commit f53f240b49
2 changed files with 57 additions and 0 deletions

View File

@@ -79,6 +79,11 @@ Such expanded modulemd files are then added to database as the next step in
The ``submit_module_build(...)`` then moves the module builds to "init" state and sends a message on
the configured message bus.
There is a build option for MBS which enables us to override stream expansion and define contexts
directly. For more information see |docs/STATIC_CONTEXTS.rst|_.
.. |docs/STATIC_CONTEXTS.rst| replace:: ``docs/STATIC_CONTEXTS.rst``
.. _docs/STATIC_CONTEXTS.rst: STATIC_CONTEXTS.rst
Backend handles module moved to the "init" state
------------------------------------------------

52
docs/STATIC_CONTEXTS.rst Normal file
View File

@@ -0,0 +1,52 @@
Static contexts
===============
- the user can specifically set their own context and dependencies when required through
``mbs_options``. ``mbs_options`` is a dict which is part of the ``xmd`` property and
is used to configure additional build options for MBS. To make static contexts work,
you need to define ``contexts`` dict inside ``mbs_options`` property.
- The context definition needs to be defined in the initial modulemd yaml file. ``contexts``
build property overrides any dependencies set through the ``dependencies`` property.
- `static contexts` and `stream expansion` are mutually exclusive i. e. the streams defined in
``buildrequires`` and ``requires`` of `static context` will not be expanded and need
to be precisely defined by the user. (You can not use `stream expansion` notation as ``[]``
or ``-f28`` as this will result in an error)
- `static contexts` only override ``context`` of a module stream i. e. the one which
is the part of the module streams NSVC. ``build context`` is still calculated and preserved
in the resulting build in ``mbs`` property in ``xmd`` so the reuse of builds with the
same ``build contexts`` takes place.
- as per design of the modulemdlib the only types which can be put inside of the ``xmd``
property are ``dict`` and ``string``.
**Example**:
::
.
.
.
xmd:
mbs_options:
contexts:
context1:
buildrequires:
module1: stream1
.
.
.
moduleN: streamN
requires:
moduleN: stream1
.
.
.
moduleN: streamN
.
.
.
contextN:
.
.
.