Skip to content

Commit

Permalink
Github variables wont do the trick
Browse files Browse the repository at this point in the history
  • Loading branch information
dwoz committed Feb 11, 2025
1 parent c2f129a commit 997f063
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
14 changes: 11 additions & 3 deletions cicd/shared-gh-workflows-context.yml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 10 additions & 3 deletions tools/ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:")
]
Expand Down Expand Up @@ -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}")
Expand Down

0 comments on commit 997f063

Please sign in to comment.