Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve README #110

Merged
merged 6 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 44 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,63 @@
# setup-cli

This is a composite GitHub Action that sets up the Databricks CLI (preview version `>=0.100`) in your GitHub Actions workflow.
setup-cli makes it easy to install the [Databricks CLI](https://github.com/databricks/cli) in your environment.

It provides a composite GitHub Action and a portable installation script that can be used in most CI/CD systems and development environments.

Full documentation about installation can be found at:
* (AWS) https://docs.databricks.com/en/dev-tools/cli/install.html
* (Azure) https://learn.microsoft.com/en-us/azure/databricks/dev-tools/cli/install
* (GCP) https://docs.gcp.databricks.com/en/dev-tools/cli/install.html

## Usage

In your GitHub Actions workflow, use the following step:
This repository contains an `install.sh` script that can be invoked to install the Databricks CLI.

To install the latest version, run the following command:

```bash
curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/main/install.sh | sh
```

To install a specific version, you can replace `main` with a specific release tag:

```bash
curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/v0.221.1/install.sh | sh
```

## GitHub Actions
pietern marked this conversation as resolved.
Show resolved Hide resolved

This repository can be used from GitHub Actions.

For a complete example of how to use the Databricks CLI in a GitHub Actions workflow, see the following guide:
* (AWS) https://docs.databricks.com/en/dev-tools/bundles/ci-cd.html
* (Azure) https://learn.microsoft.com/en-us/azure/databricks/dev-tools/bundles/ci-cd
* (GCP) https://docs.gcp.databricks.com/en/dev-tools/bundles/ci-cd.html

To always use the latest version of the Databricks CLI, use the action from the `main` branch:

```yml
- uses: databricks/setup-cli@main
```

<!--
### Snapshot build
In case you need to use a specific version of the Databricks CLI, use the action from a release tag:

Ensure you have a token with access to the [Databricks CLI repository](https://github.com/databricks/cli).
```yml
- uses: databricks/setup-cli@v0.221.1
```

In your GitHub Actions workflow, use the following step:
Replace the tag with the version you want to use.

Alternatively, you can specify the version as a parameter to the action:

```yml
- uses: databricks/setup-cli
- uses: databricks/setup-cli@main
with:
token: ${{ secrets.GH_TOKEN }}
version: 0.221.1
```
//-->

## Preview notice

Please note that the Databricks CLI and Databricks asset bundles are in public preview
as defined on https://docs.databricks.com/en/release-notes/release-types.html. This means
that it has medium-to-high maturity and can be used in production.
Please note that the Databricks CLI is in public preview as defined on
https://docs.databricks.com/en/release-notes/release-types.html.
This means that it has medium-to-high maturity and can be used in production.
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ if [ ! -w "$TARGET" ]; then
echo "Please run this script through 'sudo' to allow writing to $TARGET."
echo
echo "If you're running this script from a terminal, you can do so using"
echo " curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/main/install.sh | sudo sh"
echo " curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/v${VERSION}/install.sh | sudo sh"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, we should definitely be using the install script from the tagged versions of the repo.

exit 1
fi

Expand Down
Loading