earthly

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: Apache-2.0, MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EarthlyExecutionResult

type EarthlyExecutionResult struct {
	Artifacts map[string]string `json:"artifacts"`
	Images    map[string]string `json:"images"`
}

EarthlyExecutionResult contains the results of an Earthly execution.

type EarthlyExecutor

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

EarthlyExecutor is an Executor that runs Earthly targets.

func NewEarthlyExecutor

func NewEarthlyExecutor(
	earthfile, target string,
	executor executor.Executor,
	store secretstore.SecretStore,
	logger *slog.Logger,
	opts ...EarthlyExecutorOption,
) EarthlyExecutor

NewEarthlyExecutor creates a new EarthlyExecutor.

func (EarthlyExecutor) Run

Run executes the Earthly target and returns the resulting images and artifacts.

type EarthlyExecutorOption

type EarthlyExecutorOption func(e *EarthlyExecutor)

EarthlyExecutorOption is an option for configuring an EarthlyExecutor.

func WithArtifact

func WithArtifact(path string) EarthlyExecutorOption

WithArtifact is an option for configuring an EarthlyExecutor to output all artifacts contained within the given target to the given path.

func WithCI

func WithCI() EarthlyExecutorOption

func WithPlatforms

func WithPlatforms(platforms ...string) EarthlyExecutorOption

WithPlatforms is an option for configuring an EarthlyExecutor to run the Earthly target against the given platforms.

func WithPrivileged

func WithPrivileged() EarthlyExecutorOption

WithPrivileged is an option for configuring an EarthlyExecutor to run the Earthly target with elevated privileges.

func WithRetries

func WithRetries(retries int) EarthlyExecutorOption

WithRetries is an option for configuring an EarthlyExecutor with the number of retries to attempt if the Earthly target fails.

func WithSatellite

func WithSatellite(s string) EarthlyExecutorOption

WithSatellite is an option for configuring an EarthlyExecutor with the remote satellite to use.

func WithSecrets

func WithSecrets(secrets []schema.Secret) EarthlyExecutorOption

WithSecrets is an option for configuring an EarthlyExecutor with secrets to be passed to the Earthly target.

func WithTargetArgs

func WithTargetArgs(args ...string) EarthlyExecutorOption

WithEarthlyArgs is an option for configuring an EarthlyExecutor with additional arguments that will be passed to the Earthly target.

type EarthlySecret

type EarthlySecret struct {
	Id    string
	Value string
}

EarthlySecret represents a secret to be passed to Earthly.

Jump to

Keyboard shortcuts

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