Commit 66fa1696 authored by Anas Nashif's avatar Anas Nashif Committed by Stephanos Ioannidis
Browse files

ci: do not hardcode es server in script



Use environment variable instead of hardcoding server in script. This
will allow reuse.

Signed-off-by: default avatarAnas Nashif <anas.nashif@intel.com>
parent fcd60cf7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -268,6 +268,7 @@ jobs:
    name: "Publish Unit Tests Results"
    env:
      ELASTICSEARCH_KEY: ${{ secrets.ELASTICSEARCH_KEY }}
      ELASTICSEARCH_SERVER: "https://elasticsearch.zephyrproject.io:443"
    needs: twister-build
    runs-on: ubuntu-20.04
    # the build-and-test job might be skipped, we don't need to run this job then
+1 −3
Original line number Diff line number Diff line
@@ -14,8 +14,6 @@ import os
import json
import argparse

host = "https://elasticsearch.zephyrproject.io:443"

def gendata(f, index):
    with open(f, "r") as j:
        data = json.load(j)
@@ -63,7 +61,7 @@ def main():
        sys.exit(0)

    es = Elasticsearch(
        [host],
        [os.environ['ELASTICSEARCH_SERVER']],
        api_key=os.environ['ELASTICSEARCH_KEY'],
        verify_certs=False
        )