Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mesosphere/d2iq-daggers

Collection of tasks and utilities to manage ci-cd pipelines
https://github.com/mesosphere/d2iq-daggers

ci-cd dagger dagger-io magefile

Last synced: about 2 months ago
JSON representation

Collection of tasks and utilities to manage ci-cd pipelines

Awesome Lists containing this project

README

        

# D2iQ Daggers

`d2iq-daggers` is a component library for [dagger](https://github.com/dagger/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.

## Installation

To install daggers, use the go command:

```bash
$ go get github.com/mesosphere/d2iq-daggers
```

## Usage

To use daggers, import the package into your project:

```go
import "github.com/mesosphere/d2iq-daggers/daggers"
```

Then, use the `daggers` package to create a new Runtime:

```go
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:

```go
import "github.com/mesosphere/d2iq-daggers/catalog/golang"
```

```go
_, 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)
}
```

## License

Apache License 2.0, see [LICENSE](LICENSE).