Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store CLI --context settings as RP launch attributes #115

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion newa.spec
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%{_bindir}/newa

%changelog
* Tue June 06 2024 Miroslav Vadkerti <[email protected]> - 0.1-1
* Thu June 06 2024 Miroslav Vadkerti <[email protected]> - 0.1-1
- Initial packaging
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
Loading