mirror of https://github.com/databricks/cli.git
Cleanup
This commit is contained in:
parent
50b76bb41e
commit
6b221c02e5
|
@ -6,6 +6,7 @@ import (
|
||||||
|
|
||||||
"github.com/databricks/cli/bundle"
|
"github.com/databricks/cli/bundle"
|
||||||
"github.com/databricks/cli/bundle/config"
|
"github.com/databricks/cli/bundle/config"
|
||||||
|
"github.com/databricks/databricks-sdk-go/service/jobs"
|
||||||
"github.com/databricks/databricks-sdk-go/service/ml"
|
"github.com/databricks/databricks-sdk-go/service/ml"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -37,13 +38,13 @@ func processDevelopmentMode(b *bundle.Bundle) error {
|
||||||
r.Jobs[i].MaxConcurrentRuns = developmentConcurrentRuns
|
r.Jobs[i].MaxConcurrentRuns = developmentConcurrentRuns
|
||||||
}
|
}
|
||||||
if r.Jobs[i].Schedule != nil {
|
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 {
|
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 {
|
if r.Jobs[i].Trigger != nil {
|
||||||
r.Jobs[i].Trigger.PauseStatus = "PAUSED"
|
r.Jobs[i].Trigger.PauseStatus = jobs.PauseStatusPaused
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,6 @@ var deployCmd = &cobra.Command{
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
b := bundle.Get(cmd.Context())
|
b := bundle.Get(cmd.Context())
|
||||||
|
|
||||||
return deploy(cmd, b)
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
func deploy(cmd *cobra.Command, b *bundle.Bundle) error {
|
|
||||||
// If `--force` is specified, force acquisition of the deployment lock.
|
// If `--force` is specified, force acquisition of the deployment lock.
|
||||||
b.Config.Bundle.Lock.Force = forceDeploy
|
b.Config.Bundle.Lock.Force = forceDeploy
|
||||||
b.Config.Bundle.ComputeID = computeID
|
b.Config.Bundle.ComputeID = computeID
|
||||||
|
@ -28,6 +23,7 @@ func deploy(cmd *cobra.Command, b *bundle.Bundle) error {
|
||||||
phases.Build(),
|
phases.Build(),
|
||||||
phases.Deploy(),
|
phases.Deploy(),
|
||||||
))
|
))
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
var forceDeploy bool
|
var forceDeploy bool
|
||||||
|
|
Loading…
Reference in New Issue