--- a/runner/cmd.go Thu Dec 23 16:07:04 2021 -0600
+++ b/runner/cmd.go Thu Dec 23 16:11:49 2021 -0600
@@ -45,37 +45,6 @@
Plans []string `kong:"arg,help='The names of the plans to run',default='default'"`
-func (c *RunnerCmd) runPlans(ctx context.Context, rt *runtime.Runtime) error {
- errChan := make(chan error, 1)
- for _, name := range c.Plans {
- if err := plan.Execute(name, rt); err != nil {
func (c *RunnerCmd) loadConfig() (string, *config.Config, error) {
cfg, err := config.LoadFile(c.ConfigFile)
@@ -124,7 +93,11 @@
ctx, cancel := context.WithCancel(context.Background())
go func(ctx context.Context, cfg *config.Config) {
- errChan <- c.runPlans(ctx, rt)
+ metaplan := &runtime.MetaPlan{ + errChan <- metaplan.Execute(ctx, rt) --- a/runtime/metaplans.go Thu Dec 23 16:07:04 2021 -0600
+++ b/runtime/metaplans.go Thu Dec 23 16:11:49 2021 -0600
@@ -17,6 +17,7 @@
@@ -42,3 +43,43 @@
+// Execute runs the MetaPlan +func (m *MetaPlan) Execute(ctx context.Context, rt *Runtime) error { + errChan := make(chan error, 1) + for _, name := range m.Plans { + mp, ok := rt.MetaPlans[name] + if err := mp.Execute(ctx, rt); err != nil { + if err := plan.Execute(name, rt); err != nil {