UNCLASSIFIED - NO CUI

Skip to content

Create Taskfile executor

Implement the taskfile executor code into bbctl.

Extremely minimal implementation here:

package main

import (
	"context"
	"log"

	"github.com/go-task/task/v3"
)

func main() {
	e := task.NewExecutor(
		task.WithVersionCheck(true),
		task.WithDownload(true),
		task.WithDir("./"),
	)
	if err := e.Setup(); err != nil {
		log.Fatal(err)
	}

	ctx := context.Background()

	e.Run(ctx, &task.Call{Task: "default"})

}

Acceptance Criteria

  • Write the executor code that will allow bbctl to execute a Taskfile
    • bbctl should be able to execute a specific target in a Tasfile.
    • If the taskfile includes other taskfiles, bbctl needs to be able to resolve the dag
  • The taskfile location should be arbitrary and configurable
Edited by Daniel Dides