2022-12-12 11:49:25 +00:00
|
|
|
package phases
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/databricks/bricks/bundle"
|
|
|
|
"github.com/databricks/bricks/bundle/config/interpolation"
|
|
|
|
"github.com/databricks/bricks/bundle/config/mutator"
|
2022-12-15 16:30:33 +00:00
|
|
|
"github.com/databricks/bricks/bundle/deploy/terraform"
|
2022-12-12 11:49:25 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// The initialize phase fills in defaults and connects to the workspace.
|
|
|
|
// Interpolation of fields referring to the "bundle" and "workspace" keys
|
|
|
|
// happens upon completion of this phase.
|
|
|
|
func Initialize() bundle.Mutator {
|
|
|
|
return newPhase(
|
|
|
|
"initialize",
|
|
|
|
[]bundle.Mutator{
|
|
|
|
mutator.PopulateCurrentUser(),
|
|
|
|
mutator.DefaultArtifactPath(),
|
2022-12-16 13:49:23 +00:00
|
|
|
mutator.TranslateNotebookPaths(),
|
2022-12-12 11:49:25 +00:00
|
|
|
interpolation.Interpolate(
|
|
|
|
interpolation.IncludeLookupsInPath("bundle"),
|
|
|
|
interpolation.IncludeLookupsInPath("workspace"),
|
|
|
|
),
|
2022-12-15 16:30:33 +00:00
|
|
|
terraform.Initialize(),
|
2022-12-12 11:49:25 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
}
|