From 3bad98f72f75805295883d1df5a4993c24c2c02d Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Wed, 31 Dec 2025 15:46:20 +0000 Subject: [PATCH 1/3] disabling dev profile --- databricks.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/databricks.yml b/databricks.yml index 2534b27..844258a 100644 --- a/databricks.yml +++ b/databricks.yml @@ -82,7 +82,7 @@ variables: staging_env_sp_id: default: "d588f2c8-0c0a-4ded-9da2-0663bf8dd994" prod_env_sp_id: - default: "my-sp-id-jfsdkjhfjsdhfkjh" + default: "811de200-7873-4ab3-a435-da3cddf13c36" # for external package maybe qqqq i dont think we will export there are poetry bundle example repos if we decide to # artifacts: @@ -92,17 +92,18 @@ variables: # Deployment environments targets: + # qqqq should we have a personal section for deploying to own space ??? dev: # qqqq what is the process of developing and deploying dabs for own area. # qqqq would it actually be staging with features against folders !!!!??? - + # qqqq We do github checks against DEV and DEV would be analyst only env so do we actually want to deploy to dev shared workspace mode: development # Deploy under own user not service principle default: true # This is the the default deployment workspace workspace: # profile means in gets set values from [dev] section of databrickscfg useful on local machine, unneeded in databricks environment - profile: dev + # profile: dev # specify hosts in the databricks.yml not config for clarity # dev databricks host host: https://adb-295718430158257.17.azuredatabricks.net @@ -146,8 +147,8 @@ targets: # Staging storage account storage_account: unifiedrptdeltalake permissions: - - user_name: philip.tate@nhs.net - level: CAN_MANAGE + #- user_name: philip.tate@nhs.net + # level: CAN_MANAGE - group_name: staging_env_users level: CAN_VIEW - service_principal_name: "${var.staging_env_sp_id}" @@ -170,8 +171,8 @@ targets: # Prod storage account storage_account: unifiedrptdeltalake permissions: - - user_name: philip.tate@nhs.net - level: CAN_MANAGE + #- user_name: philip.tate@nhs.net + # level: CAN_MANAGE - group_name: prod_env_users level: CAN_VIEW - service_principal_name: "${var.prod_env_sp_id}" From 6fccc580c013d494cf468e77fbdd57e1ddbae4eb Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Wed, 31 Dec 2025 16:05:26 +0000 Subject: [PATCH 2/3] yml indents --- .github/workflows/prod-cd.yml | 34 +++++++++++++++--------------- .github/workflows/prod-pr.yml | 36 ++++++++++++++++---------------- .github/workflows/staging-pr.yml | 34 +++++++++++++++--------------- 3 files changed, 52 insertions(+), 52 deletions(-) diff --git a/.github/workflows/prod-cd.yml b/.github/workflows/prod-cd.yml index 63b264c..5b1cd01 100644 --- a/.github/workflows/prod-cd.yml +++ b/.github/workflows/prod-cd.yml @@ -10,26 +10,26 @@ on: jobs: deploy_prod: - name: "Deploy Bundle to Production Environment" - runs-on: ubuntu-latest - environment: prod - env: - DATABRICKS_HOST: ${{ vars.DBX_HOST }} - DATABRICKS_CLIENT_ID: ${{ vars.DBX_SP_ID }} - DATABRICKS_CLIENT_SECRET: ${{ secrets.DBX_SP_SECRET }} - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Databricks CLI - uses: databricks/setup-cli@main + name: "Deploy Bundle to Production Environment" + runs-on: ubuntu-latest + environment: prod + env: + DATABRICKS_HOST: ${{ vars.DBX_HOST }} + DATABRICKS_CLIENT_ID: ${{ vars.DBX_SP_ID }} + DATABRICKS_CLIENT_SECRET: ${{ secrets.DBX_SP_SECRET }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Databricks CLI + uses: databricks/setup-cli@main - - name: Deploy Prod Bundle + - name: Deploy Prod Bundle # trigger target the prod deploy in databricks.yml - run: databricks bundle deploy -t prod --auto-approve + run: databricks bundle deploy -t prod --auto-approve + - # qqqq add version and changelog creation step, and give a dab version matching repo version # - uses: actions/checkout@v4 # - uses: databricks/setup-cli@main diff --git a/.github/workflows/prod-pr.yml b/.github/workflows/prod-pr.yml index 8b2a8c2..260108f 100644 --- a/.github/workflows/prod-pr.yml +++ b/.github/workflows/prod-pr.yml @@ -24,24 +24,24 @@ jobs: - name: Validate Prod Target run: databricks bundle validate -t prod - check-staging-is-stable: - name: Check staging still stable before deploy to prod - runs-on: ubuntu-latest - environment: staging - env: - DATABRICKS_HOST: ${{ vars.DBX_HOST }} - DATABRICKS_CLIENT_ID: ${{ vars.DBX_SP_ID }} - DATABRICKS_CLIENT_SECRET: ${{ secrets.DBX_SP_SECRET }} - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Databricks CLI - uses: databricks/setup-cli@main + check-staging-is-stable: + name: Check staging still stable before deploy to prod + runs-on: ubuntu-latest + environment: staging + env: + DATABRICKS_HOST: ${{ vars.DBX_HOST }} + DATABRICKS_CLIENT_ID: ${{ vars.DBX_SP_ID }} + DATABRICKS_CLIENT_SECRET: ${{ secrets.DBX_SP_SECRET }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Databricks CLI + uses: databricks/setup-cli@main # The notebook will actually run both as set up atm but maybe its ok for now - - name: Check Staging Integration Tests Before Allowing Prod Deploy - run: | - echo "running the integration yml test job integration_test_job.yml" - databricks bundle run -t staging run_integration_tests + - name: Check Staging Integration Tests Before Allowing Prod Deploy + run: | + echo "running the integration yml test job integration_test_job.yml" + databricks bundle run -t staging run_integration_tests diff --git a/.github/workflows/staging-pr.yml b/.github/workflows/staging-pr.yml index 2a87a09..7ddbbb2 100644 --- a/.github/workflows/staging-pr.yml +++ b/.github/workflows/staging-pr.yml @@ -24,23 +24,23 @@ jobs: - name: Validate Staging Target run: databricks bundle validate -t staging - check-dev-is-stable: - name: Check dev still stable before deploy to staging - runs-on: ubuntu-latest - environment: dev - env: - DATABRICKS_HOST: ${{ vars.DBX_HOST }} - DATABRICKS_CLIENT_ID: ${{ vars.DBX_SP_ID }} - DATABRICKS_CLIENT_SECRET: ${{ secrets.DBX_SP_SECRET }} - steps: - - name: Checkout code - uses: actions/checkout@v4 + check-dev-is-stable: + name: Check dev still stable before deploy to staging + runs-on: ubuntu-latest + environment: dev + env: + DATABRICKS_HOST: ${{ vars.DBX_HOST }} + DATABRICKS_CLIENT_ID: ${{ vars.DBX_SP_ID }} + DATABRICKS_CLIENT_SECRET: ${{ secrets.DBX_SP_SECRET }} + steps: + - name: Checkout code + uses: actions/checkout@v4 - - name: Set up Databricks CLI - uses: databricks/setup-cli@main + - name: Set up Databricks CLI + uses: databricks/setup-cli@main # The notebook will actually run both as set up atm but maybe its ok for now - - name: Check Dev Integration Tests Before Allowing Sing Deploy - run: | - echo "running the integration yml test job integration_test_job.yml" - databricks bundle run -t dev run_integration_tests \ No newline at end of file + - name: Check Dev Integration Tests Before Allowing Sing Deploy + run: | + echo "running the integration yml test job integration_test_job.yml" + databricks bundle run -t dev run_integration_tests \ No newline at end of file From e52cc3f9c4992177b3bfedbaaabbe0df48aff4ba Mon Sep 17 00:00:00 2001 From: Phil-NHS Date: Wed, 31 Dec 2025 16:28:03 +0000 Subject: [PATCH 3/3] integration test job name --- .github/workflows/dev-cd.yml | 2 +- .github/workflows/prod-pr.yml | 2 +- .github/workflows/staging-cd.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dev-cd.yml b/.github/workflows/dev-cd.yml index 920d0ee..ad20841 100644 --- a/.github/workflows/dev-cd.yml +++ b/.github/workflows/dev-cd.yml @@ -58,4 +58,4 @@ jobs: - name: Check Dev Integration Tests After Deploy run: | echo "running the integration yml test job integration_test_job.yml" - databricks bundle run -t dev run_integration_tests + databricks bundle run -t dev integration_test_job diff --git a/.github/workflows/prod-pr.yml b/.github/workflows/prod-pr.yml index 260108f..296c55f 100644 --- a/.github/workflows/prod-pr.yml +++ b/.github/workflows/prod-pr.yml @@ -43,5 +43,5 @@ jobs: - name: Check Staging Integration Tests Before Allowing Prod Deploy run: | echo "running the integration yml test job integration_test_job.yml" - databricks bundle run -t staging run_integration_tests + databricks bundle run -t staging integration_test_job diff --git a/.github/workflows/staging-cd.yml b/.github/workflows/staging-cd.yml index 4ae6f69..aa1972a 100644 --- a/.github/workflows/staging-cd.yml +++ b/.github/workflows/staging-cd.yml @@ -56,4 +56,4 @@ jobs: - name: Check Staging Integration Tests After Deploy run: | echo "running the integration yml test job integration_test_job.yml" - databricks bundle run -t staging run_integration_tests \ No newline at end of file + databricks bundle run -t staging integration_test_job \ No newline at end of file