databricks-cli/libs/template
shreyas-goenka e86a949d99
Add the `bundle_uuid` helper function for templates (#1947)
## Changes
This PR adds the `bundle_uuid` helper function that'll return a stable
identifier for the bundle for the duration of the `bundle init` command.

This is also the UUID that'll be set in the telemetry event sent during
`databricks bundle init` and would be used to correlate revenue from
bundle init with resource deployments.

Template authors should add the uuid field to their `databricks.yml`
file they generate:
```
bundle:
  # A stable identified for your DAB project. We use this UUID in the Databricks backend 
  # to correlate and identify multiple deployments of the same DAB project. 
  uuid: {{ bundle_uuid }}
```

## Tests
Unit test
2024-12-02 10:29:29 +00:00
..
templates Update target references to use `${bundle.target}` (#1935) 2024-11-27 11:51:08 +00:00
testdata Add the `bundle_uuid` helper function for templates (#1947) 2024-12-02 10:29:29 +00:00
builtin.go Use `fs.FS` interface to read template (#1910) 2024-11-20 09:28:35 +00:00
builtin_test.go Use `fs.FS` interface to read template (#1910) 2024-11-20 09:28:35 +00:00
config.go Use `fs.FS` interface to read template (#1910) 2024-11-20 09:28:35 +00:00
config_test.go Use `filer.Filer` to write template instantiation (#1911) 2024-11-20 11:11:31 +01:00
file.go Use `filer.Filer` to write template instantiation (#1911) 2024-11-20 11:11:31 +01:00
file_test.go Use `filer.Filer` to write template instantiation (#1911) 2024-11-20 11:11:31 +01:00
helpers.go Add the `bundle_uuid` helper function for templates (#1947) 2024-12-02 10:29:29 +00:00
helpers_test.go Add the `bundle_uuid` helper function for templates (#1947) 2024-12-02 10:29:29 +00:00
materialize.go Fix template initialization when running on Databricks (#1912) 2024-11-20 11:42:23 +00:00
materialize_test.go Fix template initialization when running on Databricks (#1912) 2024-11-20 11:42:23 +00:00
renderer.go Use `filer.Filer` to write template instantiation (#1911) 2024-11-20 11:11:31 +01:00
renderer_test.go Use `filer.Filer` to write template instantiation (#1911) 2024-11-20 11:11:31 +01:00