databricks-cli/bundle/phases/build.go

27 lines
617 B
Go

package phases
import (
"github.com/databricks/cli/bundle"
"github.com/databricks/cli/bundle/artifacts"
"github.com/databricks/cli/bundle/config"
"github.com/databricks/cli/bundle/config/mutator"
"github.com/databricks/cli/bundle/scripts"
)
// The build phase builds artifacts.
func Build() bundle.Mutator {
return newPhase(
"build",
[]bundle.Mutator{
scripts.Execute(config.ScriptPreBuild),
artifacts.DetectPackages(),
artifacts.InferMissingProperties(),
artifacts.BuildAll(),
scripts.Execute(config.ScriptPostBuild),
mutator.ResolveVariableReferences(
"artifacts",
),
},
)
}