databricks-cli/bundle/config/mutator/mutator.go

31 lines
912 B
Go

package mutator
import (
"github.com/databricks/cli/bundle"
"github.com/databricks/cli/bundle/config"
"github.com/databricks/cli/bundle/config/loader"
pythonmutator "github.com/databricks/cli/bundle/config/mutator/python"
"github.com/databricks/cli/bundle/scripts"
)
func DefaultMutators() []bundle.Mutator {
return []bundle.Mutator{
loader.EntryPoint(),
// Execute preinit script before processing includes.
// It needs to be done before processing configuration files to allow
// the script to modify the configuration or add own configuration files.
scripts.Execute(config.ScriptPreInit),
loader.ProcessRootIncludes(),
// Verify that the CLI version is within the specified range.
VerifyCliVersion(),
EnvironmentsToTargets(),
InitializeVariables(),
DefineDefaultTarget(),
LoadGitDetails(),
pythonmutator.ApplyPythonMutator(pythonmutator.ApplyPythonMutatorPhaseLoad),
}
}