artifacts

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package artifacts handles OCI image layer extraction for macOS VM jobs.

When a macOS VM job specifies `container: { image: ... }` in its workflow, ephemerd pulls the OCI image via containerd and extracts all layers into a flat directory on the host filesystem. This is NOT running a container -- just unpacking the filesystem layers into a regular directory that is shared with the macOS VM via virtio-fs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArtifactsDir

func ArtifactsDir(dataDir string, jobID string) string

ArtifactsDir returns the artifacts directory for a given job under the data directory.

func Cleanup

func Cleanup(dir string, log *slog.Logger)

Cleanup removes the artifacts directory for a job. It is safe to call even if the directory does not exist.

func ListContents

func ListContents(dir string) ([]string, error)

ListContents returns a list of file paths in the artifacts directory (for debugging).

Types

type Extractor

type Extractor struct {
	// contains filtered or unexported fields
}

Extractor pulls OCI images and extracts their layers into host directories.

func NewExtractor

func NewExtractor(c *client.Client, log *slog.Logger) *Extractor

NewExtractor creates an artifact extractor using the given containerd client.

func (*Extractor) Extract

func (e *Extractor) Extract(ctx context.Context, imageRef string, destDir string) error

Extract pulls the OCI image (if not already cached) and extracts all layers into destDir. The directory is created if it does not exist. Each layer is applied in order on top of the previous, producing the final merged filesystem.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL