Github variables wont do the trick

This commit is contained in:
Daniel A. Wozniak 2025-02-11 14:53:56 -07:00 committed by Daniel Wozniak
parent 91dc936543
commit 4081406715
2 changed files with 21 additions and 6 deletions

View file

@ -1,6 +1,14 @@
nox_version: "2022.8.7"
python_version: "3.10.15"
relenv_version: "0.18.0"
mandatory_os_slugs:
- ubuntu-22.04
- ubuntu-22.04-arm64
pr-testrun-slugs:
- ubuntu-24.04-pkg
- ubuntu-24.04
- rockylinux-9
- rockylinux-9-pkg
- windows-2022
- windows-2022-pkg
- macos-15
- macos-15-pkg
full-testrun-slugs:
- all

View file

@ -937,7 +937,10 @@ def _environment_slugs(ctx, slugdef, labels):
Environment slug defenitions can be a comma separated list. An "all" item
in the list will include all os and package slugs.
"""
requests = [_.strip().lower() for _ in slugdef.split(",") if _.strip()]
if isinstance(slugdef, list):
requests = slugdef
else:
requests = [_.strip().lower() for _ in slugdef.split(",") if _.strip()]
label_requests = [
_[0].rsplit(":", 1)[1] for _ in labels if _[0].startswith("test:os:")
]
@ -1074,16 +1077,20 @@ def workflow_config(
full = True
requested_slugs = _environment_slugs(
ctx,
os.environ.get("FULL_TESTRUN_SLUGS", "") or "all",
tools.utils.get_cicd_shared_context()["full-testrun-slugs"],
labels,
)
else:
requested_slugs = _environment_slugs(
ctx,
os.environ.get("PR_TESTRUN_SLUGS", ""),
tools.utils.get_cicd_shared_context()["pr-testrun-slugs"],
labels,
)
ctx.info(f"{'==== requested slugs ====':^80s}")
ctx.info(f"{pprint.pformat(requested_slugs)}")
ctx.info(f"{'==== end requested slugs ====':^80s}")
ctx.info(f"{'==== labels ====':^80s}")
ctx.info(f"{pprint.pformat(labels)}")
ctx.info(f"{'==== end labels ====':^80s}")