bust/example/golang-bin/main.go

36 lines
625 B
Go
Raw Normal View History

2022-10-29 23:25:31 +02:00
package main
import (
"context"
"log"
2022-10-31 20:16:26 +01:00
"git.front.kjuulh.io/kjuulh/bust/pkg/builder"
"git.front.kjuulh.io/kjuulh/bust/pkg/pipelines"
2022-10-29 23:25:31 +02:00
)
func main() {
ctx := context.Background()
if err := run(ctx); err != nil {
log.Fatal(err)
}
}
func run(ctx context.Context) error {
2022-10-30 18:33:59 +01:00
builder, err := builder.New(ctx)
2022-10-29 23:25:31 +02:00
if err != nil {
return err
}
defer builder.CleanUp()
2022-10-30 18:13:57 +01:00
return pipelines.
New(builder).
WithGolangBin(&pipelines.GolangBinOpts{
DockerImageOpt: &pipelines.DockerImageOpt{
ImageName: "golang-bin",
},
BuildPath: "example/golang-bin/main.go",
BinName: "golang-bin",
}).
Execute(ctx)
2022-10-29 23:25:31 +02:00
}