diff --git a/bundle/config/mutator/process_environment_mode.go b/bundle/config/mutator/process_environment_mode.go index 295afa8ab..2269007dc 100644 --- a/bundle/config/mutator/process_environment_mode.go +++ b/bundle/config/mutator/process_environment_mode.go @@ -6,6 +6,7 @@ import ( "github.com/databricks/cli/bundle" "github.com/databricks/cli/bundle/config" + "github.com/databricks/databricks-sdk-go/service/jobs" "github.com/databricks/databricks-sdk-go/service/ml" ) @@ -37,13 +38,13 @@ func processDevelopmentMode(b *bundle.Bundle) error { r.Jobs[i].MaxConcurrentRuns = developmentConcurrentRuns } if r.Jobs[i].Schedule != nil { - r.Jobs[i].Schedule.PauseStatus = "PAUSED" + r.Jobs[i].Schedule.PauseStatus = jobs.PauseStatusPaused } if r.Jobs[i].Continuous != nil { - r.Jobs[i].Continuous.PauseStatus = "PAUSED" + r.Jobs[i].Continuous.PauseStatus = jobs.PauseStatusPaused } if r.Jobs[i].Trigger != nil { - r.Jobs[i].Trigger.PauseStatus = "PAUSED" + r.Jobs[i].Trigger.PauseStatus = jobs.PauseStatusPaused } } diff --git a/cmd/bundle/deploy.go b/cmd/bundle/deploy.go index e87570199..e8c0d3958 100644 --- a/cmd/bundle/deploy.go +++ b/cmd/bundle/deploy.go @@ -14,22 +14,18 @@ var deployCmd = &cobra.Command{ RunE: func(cmd *cobra.Command, args []string) error { b := bundle.Get(cmd.Context()) - return deploy(cmd, b) + // If `--force` is specified, force acquisition of the deployment lock. + b.Config.Bundle.Lock.Force = forceDeploy + b.Config.Bundle.ComputeID = computeID + + return bundle.Apply(cmd.Context(), b, bundle.Seq( + phases.Initialize(), + phases.Build(), + phases.Deploy(), + )) }, } -func deploy(cmd *cobra.Command, b *bundle.Bundle) error { - // If `--force` is specified, force acquisition of the deployment lock. - b.Config.Bundle.Lock.Force = forceDeploy - b.Config.Bundle.ComputeID = computeID - - return bundle.Apply(cmd.Context(), b, bundle.Seq( - phases.Initialize(), - phases.Build(), - phases.Deploy(), - )) -} - var forceDeploy bool var computeID string