ci: also upload results of twiser a week full builds

Upload results of full runs we do twice a week to opensearch.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2022-11-06 00:45:23 +00:00 committed by Kumar Gala
commit e2cd634185
2 changed files with 8 additions and 4 deletions

View file

@ -288,11 +288,15 @@ jobs:
with: with:
path: artifacts path: artifacts
- if: github.event_name == 'push' - if: github.event_name == 'push' || github.event_name == 'schdule'
name: Upload to opensearch name: Upload to opensearch
run: | run: |
pip3 install opensearch-py pip3 install opensearch-py
python3 ./scripts/ci/upload_test_results.py artifacts/*/*/twister.json if [ "${{github.event_name}}" = "push" ]; then
python3 ./scripts/ci/upload_test_results.py --index zephyr-main-2 artifacts/*/*/twister.json
elif [ "${{github.event_name}}" = "schedule" ]; then
python3 ./scripts/ci/upload_test_results.py --index zephyr-weekly artifacts/*/*/twister.json
fi
- name: Merge Test Results - name: Merge Test Results
run: | run: |

View file

@ -27,8 +27,7 @@ def main():
ssl_assert_hostname = False, ssl_assert_hostname = False,
ssl_show_warn = False, ssl_show_warn = False,
) )
# Create an index with non-default settings. index_name = args.index
index_name = 'zephyr-main-2'
for f in args.files: for f in args.files:
with open(f, "r") as j: with open(f, "r") as j:
@ -50,6 +49,7 @@ def parse_args():
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('-u', '--user', help='username') parser.add_argument('-u', '--user', help='username')
parser.add_argument('-p', '--password', help='password') 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.') parser.add_argument('files', metavar='FILE', nargs='+', help='file with test data.')
args = parser.parse_args() args = parser.parse_args()