WorkflowPatcherConfig¶
- class WorkflowPatcherConfig(*, workflows: list[Workflow])[source]¶
Bases:
BaseModelThe
WorkflowPatcherConfigis used to validate the expected format for the.workflow-patcher.yml, which is used to modify the workflow templates provided by the PTB.- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Workflow(*, name: ~typing.Annotated[str, ~pydantic.functional_validators.AfterValidator(func=~exasol.toolbox.util.workflows.patch_workflow.validate_workflow_name)], remove_jobs: list[str] = <factory>, step_customizations: list[~exasol.toolbox.util.workflows.patch_workflow.StepCustomization] = <factory>)[source]¶
Bases:
BaseModelThe
Workflowis used to specify which workflow should be modified. This is determined by the workflowname. A workflow can be modified by specifying:remove_jobs- job names in this list will be removed from the workflow.step_customization- items in this list indicate which job’s step should be modified.
- step_customizations: list[StepCustomization]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class StepCustomization(*, action: ActionType, job: str, step_id: str, content: list[StepContent])[source]¶
Bases:
BaseModelThe
StepCustomizationis used to specify the desired modification. AnactionofActionType:REPLACE- means that the contents of the specifiedstep_idshould be replaced with whatevercontentis provided.INSERT_AFTER- means that the specified content should be inserted after the specifiedstep_id.
- action: ActionType¶
- content: list[StepContent]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class StepContent(*, name: str, id: str, uses: str | None = None, run: str | None = None, with_: dict[str, Any] | None = None, env: dict[str, str] | None = None, **extra_data: Any)[source]¶
Bases:
BaseModelThe
StepContentis used to lightly validate the content which would be used to REPLACE or INSERT_AFTER the specified step in the GitHub workflow.With the value
ConfigDict(extra="allow"), this model allows for further fields (e.g.dummy) to be specified without any validation. This design choice was intentional, as GitHub already allows additional fields and may specify more fields than what has been specified in this model.As the validation here is light, it is left to GitHub to validate the content. For further information on what is allowed & expected for the fields, refer to GitHub’s documentation on jobs.<job_id>.steps.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].