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

Add submit and schedule kebechet methods #1054

Merged
Merged
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
14 changes: 12 additions & 2 deletions thoth/common/openshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -1410,14 +1410,24 @@ def schedule_qebhwt_workflow(
)

def schedule_mi_workflow(
self, repository: str, *, job_id: Optional[str] = None,
self,
repository: str,
entities: Optional[str] = None,
xtuchyna marked this conversation as resolved.
Show resolved Hide resolved
*,
job_id: Optional[str] = None,
) -> Optional[str]:
"""Schedule Meta-information Indicators Workflow.

:param repository:str: GitHub repository in full name format: <repo_owner>/<repo_name>
:param entities:Optional[str]: Meta-information Indicator Entities that will be inspected
multiple entities are in form of Foo,Bar,...
"""
workflow_id = job_id or self.generate_id("mi")
template_parameters = {"WORKFLOW_ID": workflow_id, "REPOSITORY": repository}
template_parameters = {
"WORKFLOW_ID": workflow_id,
"REPOSITORY": repository,
"ENTITIES": entities,
}

return self._schedule_workflow(
workflow=self.workflow_manager.submit_mi,
Expand Down