tmt.steps.prepare.artifact package
Subpackages
- tmt.steps.prepare.artifact.providers package
- Submodules
- tmt.steps.prepare.artifact.providers.brew module
- tmt.steps.prepare.artifact.providers.copr_build module
- tmt.steps.prepare.artifact.providers.copr_repository module
- tmt.steps.prepare.artifact.providers.file module
- tmt.steps.prepare.artifact.providers.koji module
- tmt.steps.prepare.artifact.providers.repository module
- tmt.steps.prepare.artifact.providers.repository_url module
- Module contents
Module contents
- class tmt.steps.prepare.artifact.PrepareArtifact(*, step: Step, data: StepDataT, workdir: Literal[True] | Path | None = None, logger: Logger)
Bases:
PreparePlugin[PrepareArtifactData]Prepare artifacts on the guest.
Note
This is a tech preview feature.
This plugin makes a given artifact available on the guest. This can consist of downloading the artifacts and creating a preferred repository on the guest.
The goal is to make sure these exact artifacts are being used when requested in one of the test require, test recommend, or prepare install. Exact NVR should not be used in those requests, instead this plugin will take care of disambiguating the requested package based on the provided artifacts.
Currently, the following artifact providers are supported:
Koji
Builds from the Fedora Koji build system.
koji.build:<build-id>- Koji build by build IDkoji.task:<task-id>- Koji task (including scratch builds)koji.nvr:<nvr>- Koji build by NVR (name-version-release)
Example usage:
prepare: how: artifact provide: - koji.build:123456 - koji.task:654321 - koji.nvr:openssl-3.2.6-2.fc42
Brew (Red Hat internal)
Builds from the Red Hat Brew build system.
brew.build:<build-id>- Brew build by build IDbrew.task:<task-id>- Brew task (including scratch builds)brew.nvr:<nvr>- Brew build by NVR
Example usage:
prepare: how: artifact provide: - brew.build:123456 - brew.task:654321 - brew.nvr:openssl-3.2.6-2.el10
Copr
Builds from the Fedora Copr build system.
copr.build:<build-id>:<chroot>- Copr build by ID and chroot
Example usage:
prepare: how: artifact provide: - copr.build:1784470:fedora-43-x86_64
File
RPMs from local files or remote URLs.
file:<path>- Local RPM file(s) specified via path or a glob patternfile:<directory>- All RPMs from a local directoryfile:<url>- Remote RPM file URL (http/https)
Example usage:
prepare: how: artifact provide: - file:/tmp/my-package.rpm - file:/tmp/rpms/*.rpm - file:/tmp/rpms - file:https://example.com/my-package.rpm
Repository
Remote dnf repositories.
repository-file:<url>- URL to a.repofile
Note
The
repository-fileprovider only adds the dnf repository to the guest system, and does not download the RPMs from the repository.Example usage:
prepare: how: artifact provide: - repository-file:https://example.com/my-repo.repo
Store plugin name, data and parent step
- SHARED_REPO_DIR_NAME: ClassVar[str] = 'artifact-shared-repo'
- SHARED_REPO_NAME: ClassVar[str] = 'tmt-artifact-shared'
- cli_invocation: 'tmt.cli.CliInvocation' | None = None
- essential_requires() list[DependencySimple | DependencyFmfId | DependencyFile]
Collect all essential requirements of the plugin.
Essential requirements of a plugin are necessary for the plugin to perform its basic functionality.
- Returns:
a list of requirements.
- go(*, guest: Guest, environment: Environment | None = None, logger: Logger) PluginOutcome
Prepare the guest (common actions)
- class tmt.steps.prepare.artifact.PrepareArtifactData(name: str, how: str, order: int = 50, when: list[str] = <factory>, summary: str | None = None, where: list[str] = <factory>, provide: list[str] = <factory>, default_repository_priority: int = 50)
Bases:
PrepareStepData- default_repository_priority: int = 50
- provide: list[str]
- class tmt.steps.prepare.artifact.RpmArtifactInfo(_raw_artifact: dict[str, str])
Bases:
ArtifactInfoRepresents a single RPM package.
- property id: str
RPM identifier
- property location: str
- tmt.steps.prepare.artifact.get_artifact_provider(provider_id: str) type[ArtifactProvider[ArtifactInfo]]