mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-02-03 05:03:43 +08:00
Added documentation for static contexts
Signed-off-by: Martin Curlej <mcurlej@redhat.com>
This commit is contained in:
@@ -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
52
docs/STATIC_CONTEXTS.rst
Normal 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:
|
||||
.
|
||||
.
|
||||
.
|
||||
|
||||
Reference in New Issue
Block a user