d2iq-daggers
is a component library for dagger that provides a collection of tasks and
utilities to make it easier to use.
WARNING: The library is still in development and may introduce breaking changes in the future without notice.
To install daggers, use the go command:
$ go get github.com/mesosphere/d2iq-daggers
To use daggers, import the package into your project:
import "github.com/mesosphere/d2iq-daggers/daggers"
Then, use the daggers
package to create a new Runtime:
runtime, err := daggers.NewRuntime(ctx, daggers.WithVerbose(true))
if err != nil {
panic(err)
}
With the runtime, you can then use the catalog to create tasks:
import "github.com/mesosphere/d2iq-daggers/catalog/golang"
_, dir, err := golang.RunCommand(
ctx,
runtime,
golang.WithArgs([]string{"test", "-v", "-race", "-coverprofile", "coverage.txt", "-covermode", "atomic", "./..."}),
)
if err != nil {
panic(err)
}
_, err = dir.File("coverage.txt").Export(ctx, ".output/coverage.txt")
if err != nil {
panic(err)
}
Apache License 2.0, see LICENSE.