Files
octopush/ci/main.go
kjuulh 1f8ef3bc6c
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is passing
with cli
2022-10-30 18:48:11 +01:00

47 lines
912 B
Go

package main
import (
"context"
"log"
"git.front.kjuulh.io/kjuulh/dagger-go/pkg/builder"
"git.front.kjuulh.io/kjuulh/dagger-go/pkg/cli"
"git.front.kjuulh.io/kjuulh/dagger-go/pkg/pipelines"
)
func main() {
err := cli.NewCustomGoBuild("golangbin", func(ctx context.Context) error {
builder, err := builder.New(ctx)
if err != nil {
return err
}
err = pipelines.
New(builder).
WithGolangBin(&pipelines.GolangBinOpts{
DockerImageOpt: &pipelines.DockerImageOpt{
ImageName: "octopush",
},
BuildPath: "cmd/octopush/octopush.go",
BinName: "octopush",
}).
WithGolangBin(&pipelines.GolangBinOpts{
DockerImageOpt: &pipelines.DockerImageOpt{
ImageName: "octopush-server",
},
BuildPath: "cmd/server/server.go",
BinName: "server",
}).
Execute(ctx)
if err != nil {
return err
}
return nil
})
if err != nil {
log.Fatal(err)
}
}