INNER CODE UNIT · Python

repo_root

timothystewart6/k3s-ansible · .github/scripts/test-cilium-envoy-toggle.py:29

def repo_root():
    return subprocess.check_output(
        ["git", "rev-parse", "--show-toplevel"], text=True
    ).strip()


def fail(message):
    raise SystemExit("Cilium Envoy toggle test failed: " + message)


def extract_install_command(path):
    """Return the command string for the 'Install Cilium' task.

    Walks both top-level tasks and tasks nested inside a `block`/`always`/
    `rescue` list, since the Cilium deploy steps are grouped under the
    'Prepare Cilium CLI on first master and deploy CNI' block.
    """
    with open(path, encoding="utf-8") as handle:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…