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)
| 31 | |
| 32 | // Run runs all provided actions. |
| 33 | func 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. |
| 47 | func runAction(ctx context.Context, basePath string, defaultCfg v1alpha1.ZarfComponentActionDefaults, action v1alpha1.ZarfComponentAction, variableConfig *variables.VariableConfig, values value.Values, stateAccess template.StateAccess) error { |
no test coverage detected