Skip to content

Commit

Permalink
final
Browse files Browse the repository at this point in the history
  • Loading branch information
oleh_mykolaishyn committed Nov 7, 2024
1 parent 2bedf0c commit 6b56a5b
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
type: string
default: ''

env:
DATABRICKSCFG_PATH: .databrickscfg

jobs:
deploy:
name: "Build and Deploy Bundle to the Workspaces"
Expand All @@ -26,20 +23,17 @@ jobs:
# See https://github.com/databricks/setup-cli
- uses: databricks/setup-cli@main

- name: Create file and append content
- name: Configure Dev auth profile
run: |
echo -e "[dev]\nhost=${{ secrets.WORKSPACE_URL }}" > .databrickscfg
cat .databrickscfg
echo -e "[dev]\nhost=${{ secrets.DATABRICKS_HOST }}" > .databrickscfg
databricks auth env --host ${{ secrets.DATABRICKS_HOST }}
- name: Validation
run: |
ls -la
databricks auth env --host ${{ secrets.WORKSPACE_URL }}
databricks bundle validate -p dev
env:
#DATABRICKS_HOST: ${{ secrets.WORKSPACE_URL }}
DATABRICKS_CONFIG_FILE: .databrickscfg
DATABRICKS_TOKEN: ${{ secrets.SP_TOKEN }}
DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }}
DATABRICKS_BUNDLE_ENV: dev

# Deploy the bundle to the "qa" target as defined
Expand All @@ -50,14 +44,16 @@ jobs:
databricks bundle deploy \
-c ${{ github.event.inputs.cluster_id }}
env:
DATABRICKS_TOKEN: ${{ secrets.SP_TOKEN }}
DATABRICKS_CONFIG_FILE: .databrickscfg
DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }}
DATABRICKS_BUNDLE_ENV: dev

- name: Deploy with default cluster
if: ${{ github.event.inputs.cluster_id == '' }}
run: |
databricks bundle deploy
env:
DATABRICKS_TOKEN: ${{ secrets.SP_TOKEN }}
DATABRICKS_CONFIG_FILE: .databrickscfg
DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }}
DATABRICKS_BUNDLE_ENV: dev

0 comments on commit 6b56a5b

Please sign in to comment.