Skip to content

Commit

Permalink
Store CLI --context settings as RP launch attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
kkaarreell committed Nov 1, 2024
1 parent 6e6924d commit dd200a3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions newa/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,13 @@ def cmd_execute(ctx: CLIContext, workers: int, _continue: bool) -> None:
launch_attrs = jira_schedule_job_mapping[jira_id][0].request.reportportal.get(
'launch_attributes', {})
launch_attrs.update({'newa_statedir': str(ctx.state_dirpath)})
# we store CLI --context definitions as well but not overriding
# existing launch_attributes
for (k, v) in ctx.cli_context.items():
if k in launch_attrs:
ctx.logger.debug(f'Not storing context {k} as launch attribute due to a collision')
else:
launch_attrs[k] = v
launch_description = jira_schedule_job_mapping[jira_id][0].request.reportportal.get(
'launch_description', '')
if launch_description:
Expand Down

0 comments on commit dd200a3

Please sign in to comment.