I run following task in Azure DevOps, it always hangs for input? Why wasn't my bash automatic supply working?
databricksUrl=https://...
databricksToken=*****
databricks configure --token << EOF
$(databricksUrl)
$(databricksToken)
EOF
There are two solutions for Databricks CLI > 0.11.0:
~/.databricks.cfg directly in form:echo "[DEFAULT]
host = $url
token = $token" > ~/.databricks.cfg
--host & --token-file to specify host & token:echo $token > token-file
databricks configure --host $url --token-file token-file
rm -f token-file
You try the below Inline bash script to authenticate with Azure Databricks without variables.
databricks configure --token <<EOF
https://centralus.azuredatabricks.net
dapXXXXXXXXXXXXXXXXXXXXXX467
EOF

You try the below Inline bash script to authenticate with Azure Databricks with variables.
adburl="https://centralus.azuredatabricks.net"
token=dapXXXXXXXXXXXXXXXXXXXXXXXXX467
databricks configure --token <<EOF
$adburl
$token
EOF

Successfully authenticated with Azure Databricks:

OR
You can use DevOps for Azure Databricks extension.
This extension brings a set of tasks for you to operationalize build, test and deployment of Databricks Jobs and Notebooks.
Once DevOps for Azure Databricks extension installed, you can directly use Configure Databricks CLI by clicking on the Add tasks.

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With