diff --git a/.nextchanges/bundles/auto-deploy.md b/.nextchanges/bundles/auto-deploy.md new file mode 100644 index 00000000000..6159fcdfbeb --- /dev/null +++ b/.nextchanges/bundles/auto-deploy.md @@ -0,0 +1 @@ +* Add `databricks bundle deployment auto-deploy` commands, which deploy a bundle target on every push to a Git branch and show its deploy attempts. ([#8185](https://github.com/databricks/cli/pull/8185), [#8186](https://github.com/databricks/cli/pull/8186), [#8187](https://github.com/databricks/cli/pull/8187), [#8188](https://github.com/databricks/cli/pull/8188), [#8189](https://github.com/databricks/cli/pull/8189)) diff --git a/acceptance/bundle/help/bundle-deployment-auto-deploy/out.test.toml b/acceptance/bundle/help/bundle-deployment-auto-deploy/out.test.toml new file mode 100644 index 00000000000..a927a5fbc06 --- /dev/null +++ b/acceptance/bundle/help/bundle-deployment-auto-deploy/out.test.toml @@ -0,0 +1,2 @@ +Cloud = false +EnvMatrix.DMS = ["", "true"] diff --git a/acceptance/bundle/help/bundle-deployment-auto-deploy/output.txt b/acceptance/bundle/help/bundle-deployment-auto-deploy/output.txt new file mode 100644 index 00000000000..faa43d1d84a --- /dev/null +++ b/acceptance/bundle/help/bundle-deployment-auto-deploy/output.txt @@ -0,0 +1,33 @@ + +>>> [CLI] bundle deployment auto-deploy --help +Set up and inspect auto-deploy for a bundle target. + +Auto-deploy deploys a bundle target whenever commits are pushed to a branch of +the bundle's Git repository. Run these commands from the bundle directory. The +trigger is identified by the bundle's origin URL, its path in the repository +and the target (-t). + +Example: + databricks bundle deployment auto-deploy create -t prod --branch main + +Usage: + databricks bundle deployment auto-deploy [command] + +Available Commands: + attempts List the auto-deploy attempts of this bundle target, or show one + create Deploy this bundle target on every push to a branch + delete Stop auto-deploying this bundle target + get Show the auto-deploy trigger of this bundle target + list List the auto-deploy triggers of this bundle's targets + +Flags: + -h, --help[=true|false] help for auto-deploy + +Global Flags: + --debug[=true|false] enable debug logging + -o, --output type output type: text or json (default text) + -p, --profile string ~/.databrickscfg profile + -t, --target string bundle target to use (if applicable) + --var strings set values for variables defined in bundle config. Example: --var="foo=bar" + +Use "databricks bundle deployment auto-deploy [command] --help" for more information about a command. diff --git a/acceptance/bundle/help/bundle-deployment-auto-deploy/script b/acceptance/bundle/help/bundle-deployment-auto-deploy/script new file mode 100644 index 00000000000..c923880986a --- /dev/null +++ b/acceptance/bundle/help/bundle-deployment-auto-deploy/script @@ -0,0 +1 @@ +trace $CLI bundle deployment auto-deploy --help diff --git a/acceptance/bundle/help/bundle-deployment/output.txt b/acceptance/bundle/help/bundle-deployment/output.txt index 7824a822a1f..98945779a68 100644 --- a/acceptance/bundle/help/bundle-deployment/output.txt +++ b/acceptance/bundle/help/bundle-deployment/output.txt @@ -20,6 +20,7 @@ Usage: databricks bundle deployment [command] Available Commands: + auto-deploy Deploy a bundle target on every push to a Git branch bind Bind bundle-defined resources to existing resources migrate Migrate from Terraform to Direct deployment engine unbind Unbind bundle-defined resources from its managed remote resource diff --git a/cmd/bundle/deployment/autodeploy/autodeploy.go b/cmd/bundle/deployment/autodeploy/autodeploy.go index 4568b820c20..740ae14c022 100644 --- a/cmd/bundle/deployment/autodeploy/autodeploy.go +++ b/cmd/bundle/deployment/autodeploy/autodeploy.go @@ -17,9 +17,6 @@ and the target (-t). Example: databricks bundle deployment auto-deploy create -t prod --branch main`, - - // Hidden until the git-webhooks API is public. - Hidden: true, } cmd.AddCommand(newCreateCommand())