llvm_snapshot_builder.actions

llvm_snapshot_builder.actions provides classes to interact with Copr.

Submodules

Package Contents

Classes

CoprActionBuildAllPackages

Builds everyting for the given chroots and creates optimal Copr batches.

CoprActionBuildPackages

Builds a list of packages for the given chroots in the order they are given.

CoprActionCancelBuilds

Cancels builds with particular states.

CoprActionDeleteBuilds

Deletes builds with particular states.

CoprActionDeleteProject

Attempts to delete the project if it exists and cancels builds before.

CoprActionForkProject

Forks the project from the given source into the target project.

CoprActionCreatePackages

Make or edits packages in a copr project.

CoprActionCreateProject

Make or edits a project

CoprActionProjectExists

Checks if a project exists.

CoprAction

The base class for all actions.

CoprActionRegenerateRepos

Regenerates the repositories for the given project.

class llvm_snapshot_builder.actions.CoprActionBuildAllPackages(proj: Union[llvm_snapshot_builder.copr_project_ref.CoprProjectRef, str], chroots: list[str] = None, timeout: int = None, **kwargs)[source]

Bases: llvm_snapshot_builder.mixins.client_mixin.CoprClientMixin, llvm_snapshot_builder.mixins.package_builder_mixin.CoprPackageBuilderMixin, llvm_snapshot_builder.actions.action.CoprAction

Builds everyting for the given chroots and creates optimal Copr batches. See https://docs.pagure.org/copr.copr/user_documentation.html#build-batches.

NOTE: We kick-off builds for each chroot individually so that an x86_64 build doesn’t have to wait for a potentially slower s390x build.

run() bool[source]

Runs the action.

class llvm_snapshot_builder.actions.CoprActionBuildPackages(proj: Union[llvm_snapshot_builder.copr_project_ref.CoprProjectRef, str], package_names: list[str] = None, chroots: list[str] = None, wait_on_build_id: int = None, timeout: int = None, **kwargs)[source]

Bases: llvm_snapshot_builder.actions.action.CoprAction, llvm_snapshot_builder.mixins.client_mixin.CoprClientMixin, llvm_snapshot_builder.mixins.package_builder_mixin.CoprPackageBuilderMixin

Builds a list of packages for the given chroots in the order they are given.

NOTE: We kick-off builds for each chroot individually so that an x86_64 build doesn’t have to wait for a potentially slower s390x build.

run() bool[source]

Runs the action.

class llvm_snapshot_builder.actions.CoprActionCancelBuilds(states: list[str] = None, **kwargs)[source]

Bases: llvm_snapshot_builder.actions.action.CoprAction, llvm_snapshot_builder.mixins.client_mixin.CoprClientMixin, llvm_snapshot_builder.mixins.build_walker_mixin.CoprBuildWalkerMixin

Cancels builds with particular states.

cancel_states

states to cancel

Type:

list

cancel_states = ['pending', 'waiting', 'running', 'importing']
run() bool[source]

Runs the action.

class llvm_snapshot_builder.actions.CoprActionDeleteBuilds(states: list[str] = None, **kwargs)[source]

Bases: llvm_snapshot_builder.actions.action.CoprAction, llvm_snapshot_builder.mixins.client_mixin.CoprClientMixin, llvm_snapshot_builder.mixins.build_walker_mixin.CoprBuildWalkerMixin

Deletes builds with particular states.

delete_states

states to cancel

Type:

list

delete_states = ['pending', 'waiting', 'running', 'importing']
run() bool[source]

Runs the action.

class llvm_snapshot_builder.actions.CoprActionDeleteProject(proj: Union[llvm_snapshot_builder.copr_project_ref.CoprProjectRef, str], **kwargs)[source]

Bases: llvm_snapshot_builder.actions.action.CoprAction, llvm_snapshot_builder.mixins.client_mixin.CoprClientMixin

Attempts to delete the project if it exists and cancels builds before.

run() bool[source]

Runs the action.

class llvm_snapshot_builder.actions.CoprActionForkProject(source: Union[llvm_snapshot_builder.copr_project_ref.CoprProjectRef, str], target: Union[llvm_snapshot_builder.copr_project_ref.CoprProjectRef, str], **kwargs)[source]

Bases: llvm_snapshot_builder.actions.action.CoprAction, llvm_snapshot_builder.mixins.client_mixin.CoprClientMixin

Forks the project from the given source into the target project.

run() bool[source]

Runs the action.

class llvm_snapshot_builder.actions.CoprActionCreatePackages(proj: Union[llvm_snapshot_builder.copr_project_ref.CoprProjectRef, str], packagenames: list[str] = None, update: bool = False, **kwargs)[source]

Bases: llvm_snapshot_builder.actions.action.CoprAction, llvm_snapshot_builder.mixins.client_mixin.CoprClientMixin

Make or edits packages in a copr project. NOTE: This doesn’t build the packages!

default_package_names

the default packages to create/edit if not specified

Type:

list[str]

default_package_names = ['python-lit', 'llvm', 'compiler-rt', 'lld', 'clang', 'mlir', 'libomp']
run() bool[source]

Runs the action.

class llvm_snapshot_builder.actions.CoprActionCreateProject(proj: Union[llvm_snapshot_builder.copr_project_ref.CoprProjectRef, str], description: str = '', instructions: str = '', chroots: list[str] = None, delete_after_days: int = 0, update: bool = False, **kwargs)[source]

Bases: llvm_snapshot_builder.actions.action.CoprAction, llvm_snapshot_builder.mixins.client_mixin.CoprClientMixin

Make or edits a project

default_chroots

The default chroots to use for the project when creating

Type:

list

runtime_dependencies

List of external repositories (== dependencies, specified as baseurls) that will be automatically enabled together with this project repository.

Type:

list

default_chroots = ['fedora-rawhide-x86_64']
runtime_dependencies = 'https://download.copr.fedorainfracloud.org/results/%40fedora-llvm-team/llvm-compat-packages/fedor...'
run() bool[source]

Runs the action.

class llvm_snapshot_builder.actions.CoprActionProjectExists(proj: Union[llvm_snapshot_builder.copr_project_ref.CoprProjectRef, str], **kwargs)[source]

Bases: llvm_snapshot_builder.actions.action.CoprAction, llvm_snapshot_builder.mixins.client_mixin.CoprClientMixin

Checks if a project exists.

run() bool[source]

Runs the action.

class llvm_snapshot_builder.actions.CoprAction(**kwargs)[source]

Bases: abc.ABC

The base class for all actions.

abstract run() bool[source]

Runs the action.

class llvm_snapshot_builder.actions.CoprActionRegenerateRepos(proj: Union[llvm_snapshot_builder.copr_project_ref.CoprProjectRef, str], **kwargs)[source]

Bases: llvm_snapshot_builder.mixins.client_mixin.CoprClientMixin, llvm_snapshot_builder.actions.action.CoprAction

Regenerates the repositories for the given project. NOTE: The regeneration of repository data is not finished when this function returns.

run() bool[source]

Runs the action.