From 997f063701ac2656f4896d9c8ae5c33d54a3c494 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Tue, 11 Feb 2025 14:53:56 -0700 Subject: [PATCH] Github variables wont do the trick --- cicd/shared-gh-workflows-context.yml | 14 +++++++++++--- tools/ci.py | 13 ++++++++++--- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/cicd/shared-gh-workflows-context.yml b/cicd/shared-gh-workflows-context.yml index 33c01baa8df6..d29eac0ad13e 100644 --- a/cicd/shared-gh-workflows-context.yml +++ b/cicd/shared-gh-workflows-context.yml @@ -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 diff --git a/tools/ci.py b/tools/ci.py index a231e4994114..17e75355add3 100644 --- a/tools/ci.py +++ b/tools/ci.py @@ -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}")