cicd.core.mixin

cicd.core.mixin.core

class cicd.core.mixin.core.CoreMixin

Bases: LoggerMixin, GitMixin, StepMixin

cicd.core.mixin.git

class cicd.core.mixin.git.GitMixin

Bases: object

A mixin that provides helpers for git operations.

property git
property repo: Repo

cicd.core.mixin.logger

class cicd.core.mixin.logger.LoggerMixin

Bases: object

property logger

cicd.core.mixin.provider

class cicd.core.mixin.provider.ProviderMixin

Bases: object

A mixin that provides helpers to resolve the responsible class corresponding to the current CI provider.

In the following example, Env is a ProviderMixin. When running in Github Actions, Env’s provider is resolved to GithubEnv.

>>> class Env(ProviderMixin):
>>>     ...
>>> class GithubEnv(Env): # in cicd.providers.github.env
>>>     ...
>>> class GitlabEnv(Env): # in cicd.providers.gitlab.env
>>>     ...
Notes:

Use this mixin on the abstract class, not the concrete class.

T = ~T
property provider: T

Resolve the object of the corresponding provider-class.

classmethod provider_cls()
property provider_info: ProviderInfo
classmethod reset_provider()

cicd.core.mixin.step

class cicd.core.mixin.step.StepMixin

Bases: object

A mixin that provides contextual logs including time spent of the tasks under under the same context.

step(name: str, **kwargs)