ci: twister: remove reference to opensearch
We have been using elasticsearch for a while now. Remove references and old script. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
138e9591f8
commit
b2a9fca9c8
2 changed files with 2 additions and 62 deletions
4
.github/workflows/twister.yaml
vendored
4
.github/workflows/twister.yaml
vendored
|
@ -310,7 +310,7 @@ jobs:
|
|||
if: success() || failure()
|
||||
|
||||
steps:
|
||||
# Needed for opensearch and upload script
|
||||
# Needed for elasticearch and upload script
|
||||
- if: github.event_name == 'push' || github.event_name == 'schedule'
|
||||
name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
@ -324,7 +324,7 @@ jobs:
|
|||
path: artifacts
|
||||
|
||||
- if: github.event_name == 'push' || github.event_name == 'schedule'
|
||||
name: Upload to opensearch
|
||||
name: Upload to elasticsearch
|
||||
run: |
|
||||
pip3 install elasticsearch
|
||||
# set run date on upload to get consistent and unified data across the matrix.
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
# Copyright (c) 2022 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import os
|
||||
import json
|
||||
import argparse
|
||||
from opensearchpy import OpenSearch
|
||||
from opensearchpy.helpers import bulk
|
||||
|
||||
host = "dashboards.staging.zephyrproject.io"
|
||||
port = 443
|
||||
|
||||
def main():
|
||||
args = parse_args()
|
||||
if args.user and args.password:
|
||||
auth = (args.user, args.password)
|
||||
else:
|
||||
auth = (os.environ['OPENSEARCH_USER'], os.environ['OPENSEARCH_PASS'])
|
||||
|
||||
client = OpenSearch(
|
||||
hosts = [{'host': host, 'port': port}],
|
||||
http_auth=auth,
|
||||
use_ssl=True,
|
||||
verify_certs = False,
|
||||
ssl_assert_hostname = False,
|
||||
ssl_show_warn = False,
|
||||
)
|
||||
index_name = args.index
|
||||
|
||||
for f in args.files:
|
||||
with open(f, "r") as j:
|
||||
data = json.load(j)
|
||||
bulk_data = []
|
||||
for t in data['testsuites']:
|
||||
t['environment'] = data['environment']
|
||||
bulk_data.append({
|
||||
"_index": index_name,
|
||||
"_id": t['run_id'],
|
||||
"_source": t
|
||||
}
|
||||
)
|
||||
|
||||
bulk(client, bulk_data)
|
||||
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(allow_abbrev=False)
|
||||
parser.add_argument('-u', '--user', help='username')
|
||||
parser.add_argument('-p', '--password', help='password')
|
||||
parser.add_argument('-i', '--index', help='index to push to.', required=True)
|
||||
parser.add_argument('files', metavar='FILE', nargs='+', help='file with test data.')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
return args
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
Loading…
Add table
Add a link
Reference in a new issue