diff --git a/orion.py b/orion.py index ce0e6ea..cf80293 100644 --- a/orion.py +++ b/orion.py @@ -67,7 +67,8 @@ def orion(**kwargs): benchmarkIndex=test['benchmarkIndex'] uuid = kwargs["uuid"] baseline = kwargs["baseline"] - match = Matcher(index="ospst-perf-scale-ci-*", + index = "ospst-perf-scale-ci-*" + match = Matcher(index=index, level=level, ES_URL=ES_URL, verify_certs=False) if uuid == "": metadata = orion_funcs.get_metadata(test, logger) @@ -85,6 +86,8 @@ def orion(**kwargs): else: uuids = [uuid for uuid in re.split(' |,',baseline) if uuid] uuids.append(uuid) + buildUrls = orion_funcs.get_build_urls(index, uuids,match) + index=benchmarkIndex if metadata["benchmark.keyword"] in ["ingress-perf","k8s-netperf"] : ids = uuids diff --git a/utils/orion_funcs.py b/utils/orion_funcs.py index 0d7909d..dc54020 100644 --- a/utils/orion_funcs.py +++ b/utils/orion_funcs.py @@ -118,6 +118,24 @@ def get_metadata(test,logger): return metadata +def get_build_urls(index, uuids,match): + """Gets metadata of the run from each test + to get the build url + + Args: + uuids (list): str list of uuid to find build urls of + match: the fmatch instance + + + Returns: + dict: dictionary of the metadata + """ + + test = match.getResults("",uuids,index,{}) + buildUrls = {run["uuid"]: run["buildUrl"] for run in test} + return buildUrls + + def filter_metadata(uuid,match,logger): """Gets metadata of the run from each test