activator

package
v0.24.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 15 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivatedStep

type ActivatedStep struct {
	StepInfo models.StepInfoModel

	StepYMLPath string

	ActivationType ActivationType

	// ActivationInventorySource is the StepLib inventory that served the step metadata.
	// It is ActivationInventorySourceNone for git and path references.
	ActivationInventorySource ActivationInventorySource

	// ExecutablePath is a local path to the main entrypoint of the step, ready for execution.
	// This can be an empty string if:
	// - step was activated from a git reference (we checked out the source dir directly)
	// - step was activated from a local path (we copied the source dir directly)
	// - step was activated from a steplib reference, but step.yml has no entry for pre-compiled binaries (we fallback to source checkout)
	// - step was activated from a steplib reference, but step.yml has no pre-compiled binary for the current OS+arch combo (we fallback to source checkout)
	ExecutablePath string

	// DidStepLibUpdate indicates that the local steplib cache was updated while resolving the exact step version.
	// TODO: this is a leaky abstraction and we shouldn't signal this here, but it requires a bigger refactor.
	// (stepman should keep track of this info in a file probably)
	DidStepLibUpdate bool
}

func ActivateGitRefStep

func ActivateGitRefStep(
	log stepman.Logger,
	id stepid.CanonicalID,
	activatedStepDir string,
	workDir string,
) (ActivatedStep, error)

func ActivatePathRefStep

func ActivatePathRefStep(
	log stepman.Logger,
	id stepid.CanonicalID,
	activatedStepDir string,
	workDir string,
) (ActivatedStep, error)

func ActivateSteplibRefStep

func ActivateSteplibRefStep(
	log stepman.Logger,
	id stepid.CanonicalID,
	activatedStepDir string,
	workDir string,
	didStepLibUpdateInWorkflow bool,
	isOfflineMode bool,
) (ActivatedStep, error)

type ActivationInventorySource added in v0.24.2

type ActivationInventorySource string

ActivationInventorySource identifies which StepLib inventory served the step metadata.

const (
	// ActivationInventorySourceNone means the step was not activated from a StepLib (git or path ref).
	ActivationInventorySourceNone ActivationInventorySource = ""
	// ActivationInventorySourceSteplibAPI means the metadata came from the StepLib API.
	ActivationInventorySourceSteplibAPI ActivationInventorySource = "steplib_api"
	// ActivationInventorySourceSteplib means the metadata came from the locally set up StepLib
	// and its generated spec.json.
	ActivationInventorySourceSteplib ActivationInventorySource = "steplib"
)

type ActivationType added in v0.18.5

type ActivationType string
const (
	ActivationTypeSteplibExecutable ActivationType = "steplib_executable"
	ActivationTypeSteplibSource     ActivationType = "steplib_source"
	ActivationTypePathRef           ActivationType = "path"
	ActivationTypeGitRef            ActivationType = "git"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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