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)
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" )
type Activator ¶ added in v0.26.0
type Activator struct {
// contains filtered or unexported fields
}
Activator activates steps.
func New ¶ added in v0.26.0
New builds an Activator. Reuse the returned value for every step of a run: building one per step is what this constructor exists to avoid.
func (*Activator) ActivateSteplibRefStep ¶ added in v0.26.0
func (a *Activator) ActivateSteplibRefStep( id stepid.CanonicalID, activatedStepDir string, workDir string, didStepLibUpdateInWorkflow bool, ) (ActivatedStep, error)
ActivateSteplibRefStep activates a step referenced through a StepLib.
type Options ¶ added in v0.26.0
type Options struct {
// DisableSteplibAPI routes canonical Bitrise StepLib steps through a local
// git clone instead of the StepLib V2 API. Custom/self-hosted StepLibs use
// the git-clone path either way.
DisableSteplibAPI bool
// SteplibAPIURL is the base URL of the StepLib V2 API. Empty means the
// canonical Bitrise inventory.
SteplibAPIURL string
// DisablePrecompiled builds every step from source, even where the library
// offers a prebuilt executable.
DisablePrecompiled bool
// PrecompiledStorageURLs are the base URLs tried in order for precompiled
// executables. Empty means steplib.DefaultPrecompiledStorageURLs.
PrecompiledStorageURLs []string
// IsOfflineMode forbids network access, restricting activation to what is
// already in the local StepLib cache. It is not supported together with
// the StepLib V2 API, which has no local inventory to read from.
IsOfflineMode bool
}
Options is the configuration of an Activator. It is resolved once, when the Activator is built, rather than re-read on every step activation.
The flags are opt-outs, so the zero value is what production wants: the StepLib V2 API and prebuilt executables both on.
Click to show internal directories.
Click to hide internal directories.