-
Notifications
You must be signed in to change notification settings - Fork 100
/
seed.go
34 lines (29 loc) · 824 Bytes
/
seed.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package devtool
import (
"fmt"
"github.com/rilldata/rill/cli/cmd/deploy"
"github.com/rilldata/rill/cli/pkg/cmdutil"
"github.com/spf13/cobra"
)
func SeedCmd(ch *cmdutil.Helper) *cobra.Command {
cmd := &cobra.Command{
Use: "seed {cloud}",
Short: "Authenticate and deploy a seed project",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
preset := args[0]
if preset != "cloud" {
return fmt.Errorf("seeding not available for preset %q", preset)
}
return deploy.DeployFlow(cmd.Context(), ch, &deploy.Options{
GitPath: "https://github.com/rilldata/rill-examples.git",
SubPath: "rill-openrtb-prog-ads",
Name: "rill-openrtb-prog-ads",
ProdVersion: "latest",
DBDriver: "duckdb",
Slots: 2,
})
},
}
return cmd
}