Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
oleh_mykolaishyn committed Nov 7, 2024
1 parent 81d47a8 commit c44064a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ jobs:
# See https://github.com/databricks/setup-cli
- uses: databricks/setup-cli@main

- name: Configure Dev auth profile
- name: Configure demo auth profile
run: |
echo -e "[dev]\nhost=${{ secrets.DATABRICKS_HOST }}" > .databrickscfg
echo -e "[demo]\nhost=${{ secrets.DATABRICKS_HOST }}" > .databrickscfg
- name: Validation
run: |
databricks auth env --host ${{ secrets.DATABRICKS_HOST }}
databricks bundle validate \
-p dev
-p demo
env:
DATABRICKS_CONFIG_FILE: .databrickscfg
DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }}
DATABRICKS_BUNDLE_ENV: dev
DATABRICKS_BUNDLE_ENV: demo

# Deploy the bundle to the "qa" target as defined
# in the bundle's settings file.
Expand All @@ -44,21 +44,21 @@ jobs:
run: |
databricks bundle deploy \
-c ${{ github.event.inputs.cluster_id }} \
-p dev
-p demo
env:
DATABRICKS_CONFIG_FILE: .databrickscfg
DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }}
DATABRICKS_BUNDLE_ENV: dev
DATABRICKS_BUNDLE_ENV: demo

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

12 changes: 2 additions & 10 deletions databricks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,15 @@ permissions:
- level: "CAN_MANAGE"
group_name: users

#variables:
# workspace_url:
# description: Databricks Workspace URL
# type: string

workspace:
#host: "${var.workspace_url}"
root_path: /Shared/${workspace.current_user.userName}/${bundle.name}/${bundle.target}


# Do we need targets? Make sense to leave for future modifications
targets:
dev:
demo:
default: true
mode: development
#workspace:
#host: ${var.workspace_url}
#mode: development

# Need to specify when wheel package is not pre-built, otherwise comment this block
artifacts:
Expand Down

0 comments on commit c44064a

Please sign in to comment.