tasks/cluster_agent.py
def build(
    ctx,
    rebuild=False,
    build_include=None,
    build_exclude=None,
    race=False,
    development=True,
    skip_assets=False,
    policies_version=None,
    release_version="nightly-a7",
):
    """
    Build Cluster Agent

     Example invokation:
        inv cluster-agent.build
    """
    build_common(
        ctx,
        BIN_PATH,
        get_default_build_tags(build="cluster-agent"),
        "",
        rebuild,
        build_include,
        build_exclude,
        race,
        development,
        skip_assets,
    )

    if policies_version is None:
        print(f"Loading release versions for {release_version}")
        env = load_release_versions(ctx, release_version)
        if "SECURITY_AGENT_POLICIES_VERSION" in env:
            policies_version = env["SECURITY_AGENT_POLICIES_VERSION"]
            print(f"Security Agent polices for {release_version}: {policies_version}")

    build_context = "Dockerfiles/cluster-agent"
    policies_path = f"{build_context}/security-agent-policies"
    ctx.run(f"rm -rf {policies_path}")
    ctx.run(f"git clone {POLICIES_REPO} {policies_path}")
    if policies_version != "master":
        ctx.run(f"cd {policies_path} && git checkout {policies_version}")

    Build Cluster Agent

     Example invokation:
        inv cluster-agent.build
    
Build Cluster Agent
Example invokation:
inv cluster-agent.build
Build Cluster Agent Example invokation : inv cluster - agent . build
def build(
    ctx,
    rebuild=False,
    build_include=None,
    build_exclude=None,
    race=False,
    development=True,
    skip_assets=False,
    policies_version=None,
    release_version="nightly-a7",
):
    build_common(
        ctx,
        BIN_PATH,
        get_default_build_tags(build="cluster-agent"),
        "",
        rebuild,
        build_include,
        build_exclude,
        race,
        development,
        skip_assets,
    )
    if policies_version is None:
        print(f"Loading release versions for {release_version}")
        env = load_release_versions(ctx, release_version)
        if "SECURITY_AGENT_POLICIES_VERSION" in env:
            policies_version = env["SECURITY_AGENT_POLICIES_VERSION"]
            print(f"Security Agent polices for {release_version}: {policies_version}")
    build_context = "Dockerfiles/cluster-agent"
    policies_path = f"{build_context}/security-agent-policies"
    ctx.run(f"rm -rf {policies_path}")
    ctx.run(f"git clone {POLICIES_REPO} {policies_path}")
    if policies_version != "master":
        ctx.run(f"cd {policies_path} && git checkout {policies_version}")
def build ( ctx , rebuild = False , build_include = None , build_exclude = None , race = False , development = True , skip_assets = False , policies_version = None , release_version = "nightly-a7" , ) : build_common ( ctx , BIN_PATH , get_default_build_tags ( build = "cluster-agent" ) , "" , rebuild , build_include , build_exclude , race , development , skip_assets , ) if policies_version is None : print ( f"Loading release versions for {release_version}" ) env = load_release_versions ( ctx , release_version ) if "SECURITY_AGENT_POLICIES_VERSION" in env : policies_version = env [ "SECURITY_AGENT_POLICIES_VERSION" ] print ( f"Security Agent polices for {release_version}: {policies_version}" ) build_context = "Dockerfiles/cluster-agent" policies_path = f"{build_context}/security-agent-policies" ctx . run ( f"rm -rf {policies_path}" ) ctx . run ( f"git clone {POLICIES_REPO} {policies_path}" ) if policies_version != "master" : ctx . run ( f"cd {policies_path} && git checkout {policies_version}" )
Build Cluster Agent
Example invokation:
inv cluster-agent.build
Build Cluster Agent Example invokation : inv cluster - agent . build
"""
    Build Cluster Agent

     Example invokation:
        inv cluster-agent.build
    """
ctx
rebuild
build_include
build_exclude
race
development
skip_assets
policies_version
release_version