Documentation ¶
Index ¶
- type EarthlyExecutionResult
- type EarthlyExecutor
- type EarthlyExecutorOption
- func WithArtifact(path string) EarthlyExecutorOption
- func WithCI() EarthlyExecutorOption
- func WithPlatforms(platforms ...string) EarthlyExecutorOption
- func WithPrivileged() EarthlyExecutorOption
- func WithRetries(retries int) EarthlyExecutorOption
- func WithSatellite(s string) EarthlyExecutorOption
- func WithSecrets(secrets []schema.Secret) EarthlyExecutorOption
- func WithTargetArgs(args ...string) EarthlyExecutorOption
- type EarthlySecret
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 ¶
func (e EarthlyExecutor) Run() (map[string]EarthlyExecutionResult, error)
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 ¶
EarthlySecret represents a secret to be passed to Earthly.