diff --git a/docs/source/configs/index.rst b/docs/source/configs/index.rst index e5fc8cb7..7784f539 100644 --- a/docs/source/configs/index.rst +++ b/docs/source/configs/index.rst @@ -203,7 +203,7 @@ In summary: - Convert the configuration path and name to uppercase. -- Replace any dots (``.``) with underscores (``_``). +- Replace any dots (``.``) or dashes (``-``) with underscores (``_``). .. _sec-resources-configs-multiple: diff --git a/src/cijoe/core/command.py b/src/cijoe/core/command.py index 39200fe0..5a94fdaf 100644 --- a/src/cijoe/core/command.py +++ b/src/cijoe/core/command.py @@ -277,7 +277,7 @@ def getconf(self, key: str, default: Any = None): found in the initiator's environment variables. """ - envkey = key.replace(".", "_").upper() + envkey = key.replace(".", "_").replace("-", ".").upper() envvar = os.getenv(envkey) if envvar: log.debug(f"found {key} ({envkey}) in environment variables.") diff --git a/src/cijoe/core/scripts/repository_prep.py b/src/cijoe/core/scripts/repository_prep.py index ef0feeea..ce55ab09 100644 --- a/src/cijoe/core/scripts/repository_prep.py +++ b/src/cijoe/core/scripts/repository_prep.py @@ -54,6 +54,13 @@ def __call__(self, parser, namespace, values, option_string=None): action=StringToBoolAction, help="Argument for git: Clone only the history leading to the tip of the specified revision.", ) + parser.add_argument( + "--recursive", + choices=["true", "false"], + default=True, + action=StringToBoolAction, + help="Argument for git: Recurse into the registered submodules, and update any nested submodules within.", + ) def main(args, cijoe): @@ -73,6 +80,8 @@ def main(args, cijoe): depth_arg = f"--depth {depth}" if depth else "" single_branch = repos.get("single_branch", args.single_branch) single_branch_arg = "--single-branch" if single_branch else "" + recursive = repos.get("recursive", args.recursive) + recursive_arg = "--recursive" if recursive else "" repos_root = Path(repos["path"]).parent @@ -84,7 +93,7 @@ def main(args, cijoe): err, _ = run( f"[ ! -d {repos['path']} ] && " f"git clone {repos['remote']} {repos['path']} " - f"{depth_arg} {single_branch_arg} --recursive" + f"{depth_arg} {single_branch_arg} {recursive_arg}" ) if err: log.info("either already cloned or failed cloning; continuing optimisticly") @@ -108,9 +117,10 @@ def main(args, cijoe): log.error("failed pulling; giving up") return err - err, _ = run("git submodule update --init --recursive", cwd=repos["path"]) - if err: - log.info("Updating submodules failed; continuin optimisticly") + if recursive: + err, _ = run("git submodule update --init --recursive", cwd=repos["path"]) + if err: + log.info("Updating submodules failed; continuing optimisticly") err, _ = run("git status", cwd=repos["path"]) if err: diff --git a/src/cijoe/core/templates/report-workflow.html.jinja2 b/src/cijoe/core/templates/report-workflow.html.jinja2 index 37e07ddd..e45bb046 100644 --- a/src/cijoe/core/templates/report-workflow.html.jinja2 +++ b/src/cijoe/core/templates/report-workflow.html.jinja2 @@ -80,15 +80,12 @@ div.image { border-top: 1px solid; } -[id^="CONTENT_TESTREPORT"]:has(.btn-success.selected) .list-group-item:not(.list-group-item-success) { - display: none; -} -[id^="CONTENT_TESTREPORT"]:has(.btn-danger.selected) .list-group-item:not(.list-group-item-danger) { - display: none; -} -[id^="CONTENT_TESTREPORT"]:has(.btn-secondary.selected) .list-group-item:not(.list-group-item-secondary) { +[id^="CONTENT_TESTREPORT"]:has(.btn-success.selected) .list-group-item:not(.list-group-item-success, .show, .collapsing), +[id^="CONTENT_TESTREPORT"]:has(.btn-danger.selected) .list-group-item:not(.list-group-item-danger, .show, .collapsing), +[id^="CONTENT_TESTREPORT"]:has(.btn-secondary.selected) .list-group-item:not(.list-group-item-secondary, .show, .collapsing) { display: none; } + [id^="CONTENT_TESTREPORT"] .btn.selected:not(.btn-primary) { box-shadow: var(--bs-btn-focus-box-shadow); }