tasks/dogstatsd.py
def omnibus_build(
    ctx,
    log_level="info",
    base_dir=None,
    gem_path=None,
    skip_deps=False,
    release_version="nightly",
    major_version='7',
    omnibus_s3_cache=False,
    go_mod_cache=None,
):
    """
    Build the Dogstatsd packages with Omnibus Installer.
    """
    if not skip_deps:
        deps(ctx)

    # omnibus config overrides
    overrides = []

    # base dir (can be overridden through env vars, command line takes precedence)
    base_dir = base_dir or os.environ.get("DSD_OMNIBUS_BASE_DIR")
    if base_dir:
        overrides.append(f"base_dir:{base_dir}")

    overrides_cmd = ""
    if overrides:
        overrides_cmd = "--override=" + " ".join(overrides)

    with ctx.cd("omnibus"):
        env = load_release_versions(ctx, release_version)

        cmd = "bundle install"
        if gem_path:
            cmd += f" --path {gem_path}"
        ctx.run(cmd, env=env)

        omnibus = "bundle exec omnibus.bat" if sys.platform == 'win32' else "bundle exec omnibus"
        cmd = "{omnibus} build dogstatsd --log-level={log_level} {populate_s3_cache} {overrides}"
        args = {"omnibus": omnibus, "log_level": log_level, "overrides": overrides_cmd, "populate_s3_cache": ""}

        if omnibus_s3_cache:
            args['populate_s3_cache'] = " --populate-s3-cache "

        env['PACKAGE_VERSION'] = get_version(
            ctx,
            include_git=True,
            url_safe=True,
            git_sha_length=7,
            major_version=major_version,
            include_pipeline_id=True,
        )
        env['MAJOR_VERSION'] = major_version

        integrations_core_version = os.environ.get('INTEGRATIONS_CORE_VERSION')
        # Only overrides the env var if the value is a non-empty string.
        if integrations_core_version:
            env['INTEGRATIONS_CORE_VERSION'] = integrations_core_version

        # If the host has a GOMODCACHE set, try to reuse it
        if not go_mod_cache and os.environ.get('GOMODCACHE'):
            go_mod_cache = os.environ.get('GOMODCACHE')

        if go_mod_cache:
            env['OMNIBUS_GOMODCACHE'] = go_mod_cache

        ctx.run(cmd.format(**args), env=env)

    Build the Dogstatsd packages with Omnibus Installer.
    
Build the Dogstatsd packages with Omnibus Installer.
Build the Dogstatsd packages with Omnibus Installer .
def omnibus_build(
    ctx,
    log_level="info",
    base_dir=None,
    gem_path=None,
    skip_deps=False,
    release_version="nightly",
    major_version='7',
    omnibus_s3_cache=False,
    go_mod_cache=None,
):
    if not skip_deps:
        deps(ctx)
    overrides = []
    base_dir = base_dir or os.environ.get("DSD_OMNIBUS_BASE_DIR")
    if base_dir:
        overrides.append(f"base_dir:{base_dir}")
    overrides_cmd = ""
    if overrides:
        overrides_cmd = "--override=" + " ".join(overrides)
    with ctx.cd("omnibus"):
        env = load_release_versions(ctx, release_version)
        cmd = "bundle install"
        if gem_path:
            cmd += f" --path {gem_path}"
        ctx.run(cmd, env=env)
        omnibus = "bundle exec omnibus.bat" if sys.platform == 'win32' else "bundle exec omnibus"
        cmd = "{omnibus} build dogstatsd --log-level={log_level} {populate_s3_cache} {overrides}"
        args = {"omnibus": omnibus, "log_level": log_level, "overrides": overrides_cmd, "populate_s3_cache": ""}
        if omnibus_s3_cache:
            args['populate_s3_cache'] = " --populate-s3-cache "
        env['PACKAGE_VERSION'] = get_version(
            ctx,
            include_git=True,
            url_safe=True,
            git_sha_length=7,
            major_version=major_version,
            include_pipeline_id=True,
        )
        env['MAJOR_VERSION'] = major_version
        integrations_core_version = os.environ.get('INTEGRATIONS_CORE_VERSION')
        if integrations_core_version:
            env['INTEGRATIONS_CORE_VERSION'] = integrations_core_version
        if not go_mod_cache and os.environ.get('GOMODCACHE'):
            go_mod_cache = os.environ.get('GOMODCACHE')
        if go_mod_cache:
            env['OMNIBUS_GOMODCACHE'] = go_mod_cache
        ctx.run(cmd.format(**args), env=env)
def omnibus_build ( ctx , log_level = "info" , base_dir = None , gem_path = None , skip_deps = False , release_version = "nightly" , major_version = '7' , omnibus_s3_cache = False , go_mod_cache = None , ) : if not skip_deps : deps ( ctx ) overrides = [ ] base_dir = base_dir or os . environ . get ( "DSD_OMNIBUS_BASE_DIR" ) if base_dir : overrides . append ( f"base_dir:{base_dir}" ) overrides_cmd = "" if overrides : overrides_cmd = "--override=" + " " . join ( overrides ) with ctx . cd ( "omnibus" ) : env = load_release_versions ( ctx , release_version ) cmd = "bundle install" if gem_path : cmd += f" --path {gem_path}" ctx . run ( cmd , env = env ) omnibus = "bundle exec omnibus.bat" if sys . platform == 'win32' else "bundle exec omnibus" cmd = "{omnibus} build dogstatsd --log-level={log_level} {populate_s3_cache} {overrides}" args = { "omnibus" : omnibus , "log_level" : log_level , "overrides" : overrides_cmd , "populate_s3_cache" : "" } if omnibus_s3_cache : args [ 'populate_s3_cache' ] = " --populate-s3-cache " env [ 'PACKAGE_VERSION' ] = get_version ( ctx , include_git = True , url_safe = True , git_sha_length = 7 , major_version = major_version , include_pipeline_id = True , ) env [ 'MAJOR_VERSION' ] = major_version integrations_core_version = os . environ . get ( 'INTEGRATIONS_CORE_VERSION' ) if integrations_core_version : env [ 'INTEGRATIONS_CORE_VERSION' ] = integrations_core_version if not go_mod_cache and os . environ . get ( 'GOMODCACHE' ) : go_mod_cache = os . environ . get ( 'GOMODCACHE' ) if go_mod_cache : env [ 'OMNIBUS_GOMODCACHE' ] = go_mod_cache ctx . run ( cmd . format ( ** args ) , env = env )
Build the Dogstatsd packages with Omnibus Installer.
Build the Dogstatsd packages with Omnibus Installer .
"""
    Build the Dogstatsd packages with Omnibus Installer.
    """ # omnibus config overrides # base dir (can be overridden through env vars, command line takes precedence) # Only overrides the env var if the value is a non-empty string. # If the host has a GOMODCACHE set, try to reuse it
ctx
log_level
base_dir
gem_path
skip_deps
release_version
major_version
omnibus_s3_cache
go_mod_cache