github.com/databricks/cli@v0.203.0/bundle/phases/deploy.go (about) 1 package phases 2 3 import ( 4 "github.com/databricks/cli/bundle" 5 "github.com/databricks/cli/bundle/artifacts" 6 "github.com/databricks/cli/bundle/config/mutator" 7 "github.com/databricks/cli/bundle/deploy/files" 8 "github.com/databricks/cli/bundle/deploy/lock" 9 "github.com/databricks/cli/bundle/deploy/terraform" 10 "github.com/databricks/cli/bundle/libraries" 11 ) 12 13 // The deploy phase deploys artifacts and resources. 14 func Deploy() bundle.Mutator { 15 deployMutator := bundle.Seq( 16 lock.Acquire(), 17 bundle.Defer( 18 bundle.Seq( 19 mutator.ValidateGitDetails(), 20 files.Upload(), 21 libraries.MatchWithArtifacts(), 22 artifacts.CleanUp(), 23 artifacts.UploadAll(), 24 terraform.Interpolate(), 25 terraform.Write(), 26 terraform.StatePull(), 27 terraform.Apply(), 28 terraform.StatePush(), 29 ), 30 lock.Release(lock.GoalDeploy), 31 ), 32 ) 33 34 return newPhase( 35 "deploy", 36 []bundle.Mutator{deployMutator}, 37 ) 38 }