Skip to content
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
8 changes: 7 additions & 1 deletion internal/bugbash/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@
The script in this directory can be used to conveniently exec into a shell
where a CLI build for a specific branch is made available.


## Prerequisites

A snapshot build for your branch needs to exist.
These are automatically created for branches named `demo-*` and `bugbash-*`.

## Usage

This script prompts if you do NOT have at least Bash 5 installed,
but works without command completion with earlier versions.

```shell
bash <(curl -fsSL https://raw.githubusercontent.com/databricks/cli/main/internal/bugbash/exec.sh) my-branch
bash <(curl -fsSL https://raw.githubusercontent.com/databricks/cli/main/internal/bugbash/exec.sh) bugbash-my-branch
```
6 changes: 3 additions & 3 deletions internal/bugbash/exec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ echo "Looking for a snapshot build of the Databricks CLI on branch $BRANCH..."

# Find last successful build on $BRANCH.
last_successful_run_id=$(
gh run list -b "$BRANCH" -w release-build --json 'databaseId,conclusion' |
jq 'limit(1; .[] | select(.conclusion == "success")) | .databaseId'
gh run --repo databricks/cli list --branch "$BRANCH" --workflow release-build \
--json 'databaseId,conclusion' --jq 'limit(1; .[] | select(.conclusion == "success")) | .databaseId'
)
if [ -z "$last_successful_run_id" ]; then
echo "Unable to find last successful build of the release-build workflow for branch $BRANCH."
Expand All @@ -81,7 +81,7 @@ dir=$(mktemp -d)

# Download the artifact.
echo "Downloading the snapshot build..."
gh run download "$last_successful_run_id" -n cli -D "$dir/.download"
gh run --repo databricks/cli download "$last_successful_run_id" --name cli --dir "$dir/.download"

# Extract the archive for this platform.
archive=$(cli_snapshot_archive)
Expand Down
Loading