From 6b56a5b09d5d2206a8d3be69fb0d360a0b8157e2 Mon Sep 17 00:00:00 2001 From: oleh_mykolaishyn Date: Thu, 7 Nov 2024 19:48:22 +0200 Subject: [PATCH] final --- .github/workflows/cicd.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 8bad7bd..1eec53a 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -9,9 +9,6 @@ on: type: string default: '' -env: - DATABRICKSCFG_PATH: .databrickscfg - jobs: deploy: name: "Build and Deploy Bundle to the Workspaces" @@ -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 @@ -50,7 +44,8 @@ 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 @@ -58,6 +53,7 @@ jobs: run: | databricks bundle deploy env: - DATABRICKS_TOKEN: ${{ secrets.SP_TOKEN }} + DATABRICKS_CONFIG_FILE: .databrickscfg + DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }} DATABRICKS_BUNDLE_ENV: dev