Add drone #32
@ -3,13 +3,13 @@ module ci
|
|||||||
go 1.19
|
go 1.19
|
||||||
|
|
||||||
require (
|
require (
|
||||||
git.front.kjuulh.io/kjuulh/dagger-go v0.0.6
|
git.front.kjuulh.io/kjuulh/dagger-go v0.0.8
|
||||||
github.com/spf13/cobra v1.6.1
|
github.com/spf13/cobra v1.6.1
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
dagger.io/dagger v0.3.1 // indirect
|
dagger.io/dagger v0.3.1 // indirect
|
||||||
git.front.kjuulh.io/kjuulh/byg v0.0.1 // indirect
|
git.front.kjuulh.io/kjuulh/byg v0.0.7 // indirect
|
||||||
github.com/Khan/genqlient v0.5.0 // indirect
|
github.com/Khan/genqlient v0.5.0 // indirect
|
||||||
github.com/Microsoft/go-winio v0.5.2 // indirect
|
github.com/Microsoft/go-winio v0.5.2 // indirect
|
||||||
github.com/agext/levenshtein v1.2.3 // indirect
|
github.com/agext/levenshtein v1.2.3 // indirect
|
||||||
|
@ -37,6 +37,8 @@ dagger.io/dagger v0.3.1/go.mod h1:+p5s9Itrr/KT4UttGNpeUTNtVQUI2z9LDIOH9wBzu8g=
|
|||||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||||
git.front.kjuulh.io/kjuulh/byg v0.0.1 h1:SBrM5WBv1zTzt29pQMwGUJljGRI7Li7uATnZ3taotC0=
|
git.front.kjuulh.io/kjuulh/byg v0.0.1 h1:SBrM5WBv1zTzt29pQMwGUJljGRI7Li7uATnZ3taotC0=
|
||||||
git.front.kjuulh.io/kjuulh/byg v0.0.1/go.mod h1:8Vg5Mgqzva5fzHGeMlxjp/DMLbUy9uaKFxMNB34yYuA=
|
git.front.kjuulh.io/kjuulh/byg v0.0.1/go.mod h1:8Vg5Mgqzva5fzHGeMlxjp/DMLbUy9uaKFxMNB34yYuA=
|
||||||
|
git.front.kjuulh.io/kjuulh/byg v0.0.7 h1:0ZDkRj1R2lvbWUQO5GjWJum9zpVMej6l8ZXn5YNmBNE=
|
||||||
|
git.front.kjuulh.io/kjuulh/byg v0.0.7/go.mod h1:8Vg5Mgqzva5fzHGeMlxjp/DMLbUy9uaKFxMNB34yYuA=
|
||||||
git.front.kjuulh.io/kjuulh/dagger-go v0.0.3 h1:sigL3DSLEMsTYKJQjxbenLSeEKA4B53hIsPZlQPXzRM=
|
git.front.kjuulh.io/kjuulh/dagger-go v0.0.3 h1:sigL3DSLEMsTYKJQjxbenLSeEKA4B53hIsPZlQPXzRM=
|
||||||
git.front.kjuulh.io/kjuulh/dagger-go v0.0.3/go.mod h1:0AurXqWV23CwI3aFZ0UH1/aHSA5pa1sb0++FXrLTWkY=
|
git.front.kjuulh.io/kjuulh/dagger-go v0.0.3/go.mod h1:0AurXqWV23CwI3aFZ0UH1/aHSA5pa1sb0++FXrLTWkY=
|
||||||
git.front.kjuulh.io/kjuulh/dagger-go v0.0.4 h1:boRYnBLPXT6lkT5pfVTpNRCMVx5igkUSFdPbkstEJBU=
|
git.front.kjuulh.io/kjuulh/dagger-go v0.0.4 h1:boRYnBLPXT6lkT5pfVTpNRCMVx5igkUSFdPbkstEJBU=
|
||||||
@ -45,6 +47,10 @@ git.front.kjuulh.io/kjuulh/dagger-go v0.0.5 h1:bOledc4nP2OHEQXRzDCuMmVsT4EodL9yZ
|
|||||||
git.front.kjuulh.io/kjuulh/dagger-go v0.0.5/go.mod h1:0AurXqWV23CwI3aFZ0UH1/aHSA5pa1sb0++FXrLTWkY=
|
git.front.kjuulh.io/kjuulh/dagger-go v0.0.5/go.mod h1:0AurXqWV23CwI3aFZ0UH1/aHSA5pa1sb0++FXrLTWkY=
|
||||||
git.front.kjuulh.io/kjuulh/dagger-go v0.0.6 h1:7rNmurwH8GdbuaTfC/tNEg7uH8msSH1YQXqKaQRjetQ=
|
git.front.kjuulh.io/kjuulh/dagger-go v0.0.6 h1:7rNmurwH8GdbuaTfC/tNEg7uH8msSH1YQXqKaQRjetQ=
|
||||||
git.front.kjuulh.io/kjuulh/dagger-go v0.0.6/go.mod h1:0AurXqWV23CwI3aFZ0UH1/aHSA5pa1sb0++FXrLTWkY=
|
git.front.kjuulh.io/kjuulh/dagger-go v0.0.6/go.mod h1:0AurXqWV23CwI3aFZ0UH1/aHSA5pa1sb0++FXrLTWkY=
|
||||||
|
git.front.kjuulh.io/kjuulh/dagger-go v0.0.7 h1:/OvcLK5tOO+qPLf8XHdZKMwNa4//DhoZDbRBk23r02I=
|
||||||
|
git.front.kjuulh.io/kjuulh/dagger-go v0.0.7/go.mod h1:N/EXT0aOJzph/9AXuFlaA2ZuKU0P8WzaDZQXLlAL0D8=
|
||||||
|
git.front.kjuulh.io/kjuulh/dagger-go v0.0.8 h1:hbXEOYw3Q3sdwMjaEMz+v/TOnyUWSDAYFR8aQwQZF/o=
|
||||||
|
git.front.kjuulh.io/kjuulh/dagger-go v0.0.8/go.mod h1:N/EXT0aOJzph/9AXuFlaA2ZuKU0P8WzaDZQXLlAL0D8=
|
||||||
github.com/99designs/gqlgen v0.17.2/go.mod h1:K5fzLKwtph+FFgh9j7nFbRUdBKvTcGnsta51fsMTn3o=
|
github.com/99designs/gqlgen v0.17.2/go.mod h1:K5fzLKwtph+FFgh9j7nFbRUdBKvTcGnsta51fsMTn3o=
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||||
|
41
ci/main.go
41
ci/main.go
@ -1,19 +1,46 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"log"
|
"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/cli"
|
||||||
"github.com/spf13/cobra"
|
"git.front.kjuulh.io/kjuulh/dagger-go/pkg/pipelines"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
cmd := &cobra.Command{
|
err := cli.NewCustomGoBuild("golangbin", func(ctx context.Context) error {
|
||||||
Use: "dagger-go",
|
builder, err := builder.New(ctx)
|
||||||
}
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
cmd.AddCommand(cli.Build("cmd/octopush/octopush.go", ""))
|
err = pipelines.
|
||||||
if err := cmd.Execute(); err != nil {
|
New(builder).
|
||||||
log.Fatal("%w", err)
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user