2022-10-30 19:57:04 +01: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/cli"
|
|
|
|
"git.front.kjuulh.io/kjuulh/bust/pkg/pipelines"
|
2022-10-30 19:57:04 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2022-10-31 20:16:26 +01:00
|
|
|
log.Printf("building bust")
|
2022-10-30 20:46:13 +01:00
|
|
|
|
2022-10-30 19:57:04 +01:00
|
|
|
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{
|
2022-10-31 20:16:26 +01:00
|
|
|
ImageName: "bust",
|
2022-10-30 19:57:04 +01:00
|
|
|
},
|
2022-10-31 02:04:16 +01:00
|
|
|
BuildPath: "main.go",
|
2022-10-31 20:16:26 +01:00
|
|
|
BinName: "bust",
|
2022-10-31 02:04:16 +01:00
|
|
|
BaseImage: "harbor.server.kjuulh.io/docker-proxy/library/docker:dind",
|
|
|
|
CGOEnabled: true,
|
2022-10-30 19:57:04 +01:00
|
|
|
}).
|
|
|
|
Execute(ctx)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
})
|
|
|
|
if err != nil {
|
|
|
|
log.Fatal(err)
|
|
|
|
}
|
|
|
|
}
|