mirror of https://github.com/databricks/cli.git
4ccc70aeac
## Changes There are a couple places throughout the code base where interaction with environment variables takes place. Moreover, more than one of these would try to read a value from more than one environment variable as fallback (for backwards compatibility). This change consolidates those accesses. The majority of diffs in this change are mechanical (i.e. add an argument or replace a call). This change: * Moves common environment variable lookups for bundles to `bundles/env`. * Adds a `libs/env` package that wraps `os.LookupEnv` and `os.Getenv` and allows for overrides to take place in a `context.Context`. By scoping overrides to a `context.Context` we can avoid `t.Setenv` in testing and unlock parallel test execution for integration tests. * Updates call sites to pass through a `context.Context` where needed. * For bundles, introduces `DATABRICKS_BUNDLE_ROOT` as new primary variable instead of `BUNDLE_ROOT`. This was the last environment variable that did not use the `DATABRICKS_` prefix. ## Tests Unit tests pass. |
||
---|---|---|
.codegen | ||
.github | ||
.vscode | ||
bundle | ||
cmd | ||
docs | ||
folders | ||
internal | ||
libs | ||
python | ||
.codegen.json | ||
.gitattributes | ||
.gitignore | ||
.goreleaser.yaml | ||
CHANGELOG.md | ||
LICENSE | ||
Makefile | ||
NOTICE | ||
README.md | ||
go.mod | ||
go.sum | ||
main.go | ||
main_test.go |
README.md
Databricks CLI
This project is in Public Preview.
Documentation about the full REST API coverage is available in the docs folder.
Documentation is available at https://docs.databricks.com/dev-tools/cli/databricks-cli.html.
Installation
This CLI is packaged as a dependency-free binary executable and may be located in any directory. See https://github.com/databricks/cli/releases for releases and the docs pages for installation instructions.
Authentication
This CLI follows the Databricks Unified Authentication principles.
You can find a detailed description at https://github.com/databricks/databricks-sdk-go#authentication.