MCPcopy
hub / github.com/zarf-dev/zarf / Run

Function Run

src/pkg/packager/actions/actions.go:33–44  ·  view source on GitHub ↗

Run runs all provided actions.

(ctx context.Context, basePath string, defaultCfg v1alpha1.ZarfComponentActionDefaults, actions []v1alpha1.ZarfComponentAction, variableConfig *variables.VariableConfig, values value.Values, stateAccess template.StateAccess)

Source from the content-addressed store, hash-verified

31
32// Run runs all provided actions.
33func Run(ctx context.Context, basePath string, defaultCfg v1alpha1.ZarfComponentActionDefaults, actions []v1alpha1.ZarfComponentAction, variableConfig *variables.VariableConfig, values value.Values, stateAccess template.StateAccess) error {
34 if variableConfig == nil {
35 variableConfig = ptmpl.GetZarfVariableConfig(ctx, false)
36 }
37
38 for _, a := range actions {
39 if err := runAction(ctx, basePath, defaultCfg, a, variableConfig, values, stateAccess); err != nil {
40 return err
41 }
42 }
43 return nil
44}
45
46// Run commands that a component has provided.
47func runAction(ctx context.Context, basePath string, defaultCfg v1alpha1.ZarfComponentActionDefaults, action v1alpha1.ZarfComponentAction, variableConfig *variables.VariableConfig, values value.Values, stateAccess template.StateAccess) error {

Callers 4

RemoveFunction · 0.92
deployComponentsMethod · 0.92
deployComponentMethod · 0.92
assemblePackageComponentFunction · 0.92

Calls 1

runActionFunction · 0.85

Tested by

no test coverage detected