tasks/release.py
def _update_release_json_entry(
    release_json,
    release_entry,
    integrations_version,
    omnibus_software_version,
    omnibus_ruby_version,
    jmxfetch_version,
    security_agent_policies_version,
    macos_build_version,
    windows_ddnpm_driver,
    windows_ddnpm_version,
    windows_ddnpm_shasum,
):
    """
    Adds a new entry to provided release_json object with the provided parameters, and returns the new release_json object.
    """
    import requests

    jmxfetch = requests.get(
        f"https://oss.sonatype.org/service/local/repositories/releases/content/com/datadoghq/jmxfetch/{jmxfetch_version}/jmxfetch-{jmxfetch_version}-jar-with-dependencies.jar"
    ).content
    jmxfetch_sha256 = hashlib.sha256(jmxfetch).hexdigest()

    print(f"Jmxfetch's SHA256 is {jmxfetch_sha256}")
    print(f"Windows DDNPM's SHA256 is {windows_ddnpm_shasum}")

    new_version_config = OrderedDict()
    new_version_config["INTEGRATIONS_CORE_VERSION"] = integrations_version
    new_version_config["OMNIBUS_SOFTWARE_VERSION"] = omnibus_software_version
    new_version_config["OMNIBUS_RUBY_VERSION"] = omnibus_ruby_version
    new_version_config["JMXFETCH_VERSION"] = jmxfetch_version
    new_version_config["JMXFETCH_HASH"] = jmxfetch_sha256
    new_version_config["SECURITY_AGENT_POLICIES_VERSION"] = security_agent_policies_version
    new_version_config["MACOS_BUILD_VERSION"] = macos_build_version
    new_version_config["WINDOWS_DDNPM_DRIVER"] = windows_ddnpm_driver
    new_version_config["WINDOWS_DDNPM_VERSION"] = windows_ddnpm_version
    new_version_config["WINDOWS_DDNPM_SHASUM"] = windows_ddnpm_shasum

    # Necessary if we want to maintain the JSON order, so that humans don't get confused
    new_release_json = OrderedDict()

    # Add all versions from the old release.json
    for key, value in release_json.items():
        new_release_json[key] = value

    # Then update the entry
    new_release_json[release_entry] = _stringify_config(new_version_config)

    return new_release_json

    Adds a new entry to provided release_json object with the provided parameters, and returns the new release_json object.
    
Adds a new entry to provided release_json object with the provided parameters, and returns the new release_json object.
Adds a new entry to provided release_json object with the provided parameters and returns the new release_json object .
def _update_release_json_entry(
    release_json,
    release_entry,
    integrations_version,
    omnibus_software_version,
    omnibus_ruby_version,
    jmxfetch_version,
    security_agent_policies_version,
    macos_build_version,
    windows_ddnpm_driver,
    windows_ddnpm_version,
    windows_ddnpm_shasum,
):
    import requests
    jmxfetch = requests.get(
        f"https://oss.sonatype.org/service/local/repositories/releases/content/com/datadoghq/jmxfetch/{jmxfetch_version}/jmxfetch-{jmxfetch_version}-jar-with-dependencies.jar"
    ).content
    jmxfetch_sha256 = hashlib.sha256(jmxfetch).hexdigest()
    print(f"Jmxfetch's SHA256 is {jmxfetch_sha256}")
    print(f"Windows DDNPM's SHA256 is {windows_ddnpm_shasum}")
    new_version_config = OrderedDict()
    new_version_config["INTEGRATIONS_CORE_VERSION"] = integrations_version
    new_version_config["OMNIBUS_SOFTWARE_VERSION"] = omnibus_software_version
    new_version_config["OMNIBUS_RUBY_VERSION"] = omnibus_ruby_version
    new_version_config["JMXFETCH_VERSION"] = jmxfetch_version
    new_version_config["JMXFETCH_HASH"] = jmxfetch_sha256
    new_version_config["SECURITY_AGENT_POLICIES_VERSION"] = security_agent_policies_version
    new_version_config["MACOS_BUILD_VERSION"] = macos_build_version
    new_version_config["WINDOWS_DDNPM_DRIVER"] = windows_ddnpm_driver
    new_version_config["WINDOWS_DDNPM_VERSION"] = windows_ddnpm_version
    new_version_config["WINDOWS_DDNPM_SHASUM"] = windows_ddnpm_shasum
    new_release_json = OrderedDict()
    for key, value in release_json.items():
        new_release_json[key] = value
    new_release_json[release_entry] = _stringify_config(new_version_config)
    return new_release_json
def _update_release_json_entry ( release_json , release_entry , integrations_version , omnibus_software_version , omnibus_ruby_version , jmxfetch_version , security_agent_policies_version , macos_build_version , windows_ddnpm_driver , windows_ddnpm_version , windows_ddnpm_shasum , ) : import requests jmxfetch = requests . get ( f"https://oss.sonatype.org/service/local/repositories/releases/content/com/datadoghq/jmxfetch/{jmxfetch_version}/jmxfetch-{jmxfetch_version}-jar-with-dependencies.jar" ) . content jmxfetch_sha256 = hashlib . sha256 ( jmxfetch ) . hexdigest ( ) print ( f"Jmxfetch's SHA256 is {jmxfetch_sha256}" ) print ( f"Windows DDNPM's SHA256 is {windows_ddnpm_shasum}" ) new_version_config = OrderedDict ( ) new_version_config [ "INTEGRATIONS_CORE_VERSION" ] = integrations_version new_version_config [ "OMNIBUS_SOFTWARE_VERSION" ] = omnibus_software_version new_version_config [ "OMNIBUS_RUBY_VERSION" ] = omnibus_ruby_version new_version_config [ "JMXFETCH_VERSION" ] = jmxfetch_version new_version_config [ "JMXFETCH_HASH" ] = jmxfetch_sha256 new_version_config [ "SECURITY_AGENT_POLICIES_VERSION" ] = security_agent_policies_version new_version_config [ "MACOS_BUILD_VERSION" ] = macos_build_version new_version_config [ "WINDOWS_DDNPM_DRIVER" ] = windows_ddnpm_driver new_version_config [ "WINDOWS_DDNPM_VERSION" ] = windows_ddnpm_version new_version_config [ "WINDOWS_DDNPM_SHASUM" ] = windows_ddnpm_shasum new_release_json = OrderedDict ( ) for key , value in release_json . items ( ) : new_release_json [ key ] = value new_release_json [ release_entry ] = _stringify_config ( new_version_config ) return new_release_json
Adds a new entry to provided release_json object with the provided parameters, and returns the new release_json object.
Adds a new entry to provided release_json object with the provided parameters and returns the new release_json object .
"""
    Adds a new entry to provided release_json object with the provided parameters, and returns the new release_json object.
    """ # Necessary if we want to maintain the JSON order, so that humans don't get confused # Add all versions from the old release.json # Then update the entry
release_json
release_entry
integrations_version
omnibus_software_version
omnibus_ruby_version
jmxfetch_version
security_agent_policies_version
macos_build_version
windows_ddnpm_driver
windows_ddnpm_version
windows_ddnpm_shasum