mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-06 13:02:37 +00:00
kubevirt.core collection cross testing (#731)
* Initial * update python version * update python version * checkout local version of collection * add integration job * indent * Set workflow as non blocking
This commit is contained in:
22
tools/kubevirt_list_targets.py
Normal file
22
tools/kubevirt_list_targets.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import os
|
||||
import sys
|
||||
from pathlib import PosixPath
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
src = sys.argv[1]
|
||||
path = PosixPath(src) / PosixPath("tests/integration/targets/")
|
||||
|
||||
def _is_disable(path):
|
||||
flags = ("unsupported", "disabled", "unstable", "hidden")
|
||||
aliases_path = path / PosixPath("aliases")
|
||||
return (aliases_path.exists() and any((d.startswith(flags) for d in aliases_path.read_text().split("\n"))))
|
||||
|
||||
targets = [i.stem for i in path.glob("*") if i.is_dir() and not _is_disable(i)]
|
||||
with open(os.environ.get("GITHUB_OUTPUT"), "a", encoding="utf-8") as fw:
|
||||
fw.write(f"kubevirt_targets={targets}\n")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user