kas-container: track repo dir when using menu cmd
When using the kas menu command, we need to track the repository location outside of the kas container as well. This is required to prepare the environment for a later kas-container build, as the repo path inside the container is different from the outside one. For that, the location of KAS_REPO_DIR is passed via an env-var into the container. There, this value is picked up by the menu plugin and written to the .config.yaml file as `_source_host_dir`. When running kas-container build, we check if the .config.yaml file contains this node and set the KAS_REPO_DIR accordingly. The schema is extended accordingly. Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> [Jan: rework _source_dir_host extraction to make it usable for menu as well] Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
committed by
Jan Kiszka
parent
e274886ab0
commit
e9032bc278
@@ -140,3 +140,5 @@ Added
|
||||
- The ``overrides`` top-level entry can be used to pin floating repo refspecs.
|
||||
- ``_source_dir`` top-level entry is auto-generated when using the menu plugin
|
||||
and provides the path to the top repo at time of invoking the plugin.
|
||||
- ``_source_dir_host`` top-level entry is auto-generated by kas-container to
|
||||
track the source path outside of the container.
|
||||
|
@@ -538,3 +538,10 @@ Configuration reference
|
||||
This entry is auto-generated by the menu plugin and provides the path to
|
||||
the top repo at time of invoking the plugin. It must not be set
|
||||
manually and might only be defined in the top-level ``.config.yaml`` file.
|
||||
|
||||
* ``_source_dir_host``:: string [optional]
|
||||
This entry is auto-generated by the menu plugin when invoking kas via
|
||||
the ``kas-container`` script. It provides the absolute path to the top repo
|
||||
outside of the container (on the host). This value is only evaluated by the
|
||||
``kas-container`` script. It must not be set manually and might only be
|
||||
defined in the top-level ``.config.yaml`` file.
|
||||
|
Reference in New Issue
Block a user