Skip to content

gufo.thor.artefact

Artefact class.

Artefact

Artefact.

Artefacts are delivered to the containers and may contain various configuration settings. Delivery methods may vary depending on target.

Artefact may refer to a single file or to a directory. If artefact refers to directory, all directory members are exposed as single file.

Parameters:

Name Type Description Default
name str

Unique artefact name.

required
local_path Path

Artefact path on thor's local filesystem.

required

__repr__()

repr() implementation.

at(container_path)

Get mounted artefact.

Parameters:

Name Type Description Default
container_path Path

Path in the container.

required

Returns:

Type Description
Artefact

Mounted artefact instance.

copy_from(src)

Copy file from source file.

Parameters:

Name Type Description Default
src Path

Source file path.

required

iter_mounts()

Iterate over artefacts's mount points.

Artefact must be mounted and obtained via at().

Raises:

Type Description
ValueError

on misconfigurations.

write(data)

Write data to artefact.

Parameters:

Name Type Description Default
data str

File contains.

required

ArtefactMountPoint dataclass

Artefact mounting point.

Attributes:

Name Type Description
name str

Unique artefact name.

local_path Path

Path to the artefact on local file system.

container_path Path

Path to the artefact in the container.

__hash__()

hash() implementation.