run

package
v0.14.7 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License: MPL-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package run provides the run command.

Index

Constants

View Source
const (
	// ErrConflictOptions tells if the error is related to conflicting options in the command spec.
	ErrConflictOptions errors.Kind = "conflicting arguments"
	// ErrCurrentHeadIsOutOfDate indicates the local HEAD revision is outdated.
	ErrCurrentHeadIsOutOfDate errors.Kind = "current HEAD is out-of-date with the remote base branch"
	// ErrOutdatedGenCodeDetected indicates outdated generated code detected.
	ErrOutdatedGenCodeDetected errors.Kind = "outdated generated code detected"
)

Variables

This section is empty.

Functions

func CheckOutdatedGeneratedCode

func CheckOutdatedGeneratedCode(ctx context.Context, e *engine.Engine, sf Safeguards, wd string) error

CheckOutdatedGeneratedCode checks if the generated code is outdated.

func GitFileSafeguards

func GitFileSafeguards(e *engine.Engine, shouldError bool, sf Safeguards) error

GitFileSafeguards checks for untracked and uncommitted files in the repository.

func GitSafeguardDefaultBranchIsReachable

func GitSafeguardDefaultBranchIsReachable(engine *engine.Engine, safeguards Safeguards) error

GitSafeguardDefaultBranchIsReachable checks if the default branch is reachable.

func SelectPlanFile

func SelectPlanFile(terraformPlan, tofuPlan string) (planfile, provisioner string)

SelectPlanFile returns the plan file and provisioner to use based on the provided flags.

Types

type Safeguards

type Safeguards struct {
	DisableCheckGitUntracked          bool
	DisableCheckGitUncommitted        bool
	DisableCheckGitRemote             bool
	DisableCheckGenerateOutdatedCheck bool

	ReEnabled bool
}

Safeguards holds the safeguard options for the run command.

type Spec

type Spec struct {
	Engine     *engine.Engine
	WorkingDir string
	Printers   printer.Printers
	Stdout     io.Writer
	Stderr     io.Writer
	Stdin      io.Reader

	// Behavior control options
	Command         []string
	Quiet           bool
	DryRun          bool
	Reverse         bool
	ScriptRun       bool
	ContinueOnError bool
	Parallel        int
	NoRecursive     bool

	SyncDeployment    bool
	SyncDriftStatus   bool
	SyncPreview       bool
	DebugPreviewURL   string
	TechnologyLayer   preview.Layer
	TerraformPlanFile string
	PlanRenderTimeout time.Duration
	TofuPlanFile      string
	Terragrunt        bool
	EnableSharing     bool
	MockOnFail        bool
	EvalCmd           bool

	GitFilter     engine.GitFilter
	StatusFilters StatusFilters
	Target        string
	FromTarget    string
	Tags          []string
	NoTags        []string

	engine.OutputsSharingOptions

	Safeguards Safeguards
	// contains filtered or unexported fields
}

Spec is the command specification for the run command.

func (*Spec) Exec

func (s *Spec) Exec(ctx context.Context) error

Exec executes the run command.

func (*Spec) Name

func (s *Spec) Name() string

Name returns the name of the command.

type StatusFilters

type StatusFilters struct {
	StackStatus      string
	DeploymentStatus string
	DriftStatus      string
}

StatusFilters holds the status filters for the run command.

Jump to

Keyboard shortcuts

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