From d741b544cce68c81815dacf8cf307ab6b27afafb Mon Sep 17 00:00:00 2001 From: Mikhail Titov Date: Wed, 29 Nov 2023 17:56:47 -0500 Subject: [PATCH 1/2] ci-runner: updated branch parameter --- ci/tests/test.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ci/tests/test.py b/ci/tests/test.py index 8fc9950b..12bfa345 100644 --- a/ci/tests/test.py +++ b/ci/tests/test.py @@ -44,6 +44,8 @@ def run(self, start: Optional[bool] = False, end: Optional[bool] = False, command: Optional[str] = None, **kwargs: Any) -> None: assert ismuex(start, end, command), 'Arguments are mutually exclusive' + tests_group = os.getenv('TESTS_GROUP', '').lower() + record = copy.deepcopy(self.record) if start: @@ -58,7 +60,8 @@ def run(self, start: Optional[bool] = False, end: Optional[bool] = False, 'git_branch': record['data']['branch'], 'config': { 'im_number': os.getenv('IM_NUMBER'), - 'maintainer_email': os.getenv('MAINTAINER') + 'maintainer_email': os.getenv('MAINTAINER'), + 'tests_group': tests_group } } }) @@ -73,7 +76,6 @@ def run(self, start: Optional[bool] = False, end: Optional[bool] = False, }) elif command: - tests_group = os.getenv('TESTS_GROUP', '').lower() name = kwargs.get('name') or command.split()[0] start_time = str(datetime.now()) @@ -84,10 +86,7 @@ def run(self, start: Optional[bool] = False, end: Optional[bool] = False, 'test_end_time': str(datetime.now()), 'module': tests_group, 'function': 'main', - 'results': results, - 'extras': { - 'tests_group': tests_group - } + 'results': results }) if kwargs.get('stdout'): @@ -98,6 +97,9 @@ def run(self, start: Optional[bool] = False, end: Optional[bool] = False, else: raise RuntimeError('No viable option called, exiting...') + if tests_group: + record['data']['branch'] += '::' + tests_group + self._session.post(self.dashboard_url, json=record, verify=False) @staticmethod From 44b1dfda5d859d23cc6bd0d28d92e2e5af69a620 Mon Sep 17 00:00:00 2001 From: Mikhail Titov Date: Wed, 29 Nov 2023 18:57:50 -0500 Subject: [PATCH 2/2] ci-runner: updated branch parameter --- ci/tests/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/tests/test.py b/ci/tests/test.py index 12bfa345..ba4997bf 100644 --- a/ci/tests/test.py +++ b/ci/tests/test.py @@ -98,7 +98,7 @@ def run(self, start: Optional[bool] = False, end: Optional[bool] = False, raise RuntimeError('No viable option called, exiting...') if tests_group: - record['data']['branch'] += '::' + tests_group + record['data']['branch'] += '[%s]' % tests_group self._session.post(self.dashboard_url, json=record, verify=False)