PTU5KAS/kas
Andreas Reichel 7b18e5ec3b Refactor repo checkout
If a kas-file inside a repo includes another kas-file form a repo
which is not checked-out, and this 2nd repo can only be checked-out
with an SSH-key, kas fails. This is, because the constructor of
the Config class used to fetch missing repos already before the
SSH-Agent was setup.

This patch refactors the way in which kas checks-out repositories. This
also required the Config class to be split into Context and Config,
where the new Context is the build-Context, i.e. containing the
environment of commands executed by kas and the new Config is the Config
of kas itself, i.e. containing the repo dictionary.

This way it is possible to initialize the context needed for SSH setup
independently of the kas configuration.

The commands ReposFetch and ReposCheckout are refactored into a
SetupRepos command. This command parses the include files and
successively checks-out needed repos and updates the config as long
as repos are missing. The logic is taken directly from the constructor
of the former Config class (with minor adaptations).

Further refactoring will be needed to clean up the conceptual
programming patterns (i.e. to keep the Macro-Style consistent),
and to re-add the macro pattern regarding the above ReposFetch.

Signed-off-by: Andreas Reichel <andreas.reichel.ext@siemens.com>
2018-08-23 16:29:56 +02:00
..
__init__.py config: Added schema validation for configuration files 2017-10-13 14:11:10 +02:00
__main__.py entry: Consistently call python3 2017-08-31 22:31:41 +02:00
__version__.py Release 0.18.0 2018-05-17 13:12:10 +02:00
build.py Refactor repo checkout 2018-08-23 16:29:56 +02:00
config.py Refactor repo checkout 2018-08-23 16:29:56 +02:00
configschema.py build: Fix all style reports by pycodestyle v2.4.0 2018-05-17 13:00:26 +02:00
context.py Refactor repo checkout 2018-08-23 16:29:56 +02:00
includehandler.py includehandler: Silence too-many-arguments pyling warning 2018-07-18 16:26:47 +02:00
kas.py kas: added version output when starting kas 2017-10-19 17:15:26 +02:00
libcmds.py Refactor repo checkout 2018-08-23 16:29:56 +02:00
libkas.py Refactor repo checkout 2018-08-23 16:29:56 +02:00
repos.py Refactor repo checkout 2018-08-23 16:29:56 +02:00
shell.py Refactor repo checkout 2018-08-23 16:29:56 +02:00