@@ -14,6 +14,7 @@ import (
1414)
1515
1616var runOptions run.Options
17+ var deployFlag bool
1718var noWait bool
1819
1920var runCmd = & cobra.Command {
@@ -25,6 +26,17 @@ var runCmd = &cobra.Command{
2526 RunE : func (cmd * cobra.Command , args []string ) error {
2627 b := bundle .Get (cmd .Context ())
2728
29+ if deployFlag {
30+ err := deploy (cmd , b )
31+ if err != nil {
32+ return err
33+ }
34+ } else if computeID != "" {
35+ // Running notebooks is not yet implemented, otherwise we could
36+ // use --compute with a notebook
37+ return fmt .Errorf ("not supported: --compute specified without --deploy" )
38+ }
39+
2840 err := bundle .Apply (cmd .Context (), b , bundle .Seq (
2941 phases .Initialize (),
3042 terraform .Interpolate (),
@@ -92,5 +104,8 @@ var runCmd = &cobra.Command{
92104func init () {
93105 runOptions .Define (runCmd .Flags ())
94106 rootCmd .AddCommand (runCmd )
107+ runCmd .Flags ().BoolVar (& deployFlag , "deploy" , false , "Call deploy before run." )
108+ runCmd .Flags ().BoolVar (& forceDeploy , "force" , false , "Force acquisition of deployment lock." )
95109 runCmd .Flags ().BoolVar (& noWait , "no-wait" , false , "Don't wait for the run to complete." )
110+ runCmd .Flags ().StringVar (& computeID , "compute" , "" , "Override compute in the deployment with the given compute ID." )
96111}
0 commit comments