Skip to content

Commit 82a6b29

Browse files
authored
Merge pull request #29 from TechnologyEnhancedLearning/poc-dab-workflow
Poc dab workflow
2 parents b69415e + e52cc3f commit 82a6b29

6 files changed

Lines changed: 62 additions & 61 deletions

File tree

.github/workflows/dev-cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ jobs:
5858
- name: Check Dev Integration Tests After Deploy
5959
run: |
6060
echo "running the integration yml test job integration_test_job.yml"
61-
databricks bundle run -t dev run_integration_tests
61+
databricks bundle run -t dev integration_test_job

.github/workflows/prod-cd.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,26 @@ on:
1010
jobs:
1111

1212
deploy_prod:
13-
name: "Deploy Bundle to Production Environment"
14-
runs-on: ubuntu-latest
15-
environment: prod
16-
env:
17-
DATABRICKS_HOST: ${{ vars.DBX_HOST }}
18-
DATABRICKS_CLIENT_ID: ${{ vars.DBX_SP_ID }}
19-
DATABRICKS_CLIENT_SECRET: ${{ secrets.DBX_SP_SECRET }}
20-
21-
steps:
22-
- name: Checkout code
23-
uses: actions/checkout@v4
24-
25-
- name: Set up Databricks CLI
26-
uses: databricks/setup-cli@main
13+
name: "Deploy Bundle to Production Environment"
14+
runs-on: ubuntu-latest
15+
environment: prod
16+
env:
17+
DATABRICKS_HOST: ${{ vars.DBX_HOST }}
18+
DATABRICKS_CLIENT_ID: ${{ vars.DBX_SP_ID }}
19+
DATABRICKS_CLIENT_SECRET: ${{ secrets.DBX_SP_SECRET }}
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Set up Databricks CLI
26+
uses: databricks/setup-cli@main
2727

28-
- name: Deploy Prod Bundle
28+
- name: Deploy Prod Bundle
2929
# trigger target the prod deploy in databricks.yml
30-
run: databricks bundle deploy -t prod --auto-approve
30+
run: databricks bundle deploy -t prod --auto-approve
31+
3132

32-
3333
# qqqq add version and changelog creation step, and give a dab version matching repo version
3434
# - uses: actions/checkout@v4
3535
# - uses: databricks/setup-cli@main

.github/workflows/prod-pr.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,24 @@ jobs:
2424
- name: Validate Prod Target
2525
run: databricks bundle validate -t prod
2626

27-
check-staging-is-stable:
28-
name: Check staging still stable before deploy to prod
29-
runs-on: ubuntu-latest
30-
environment: staging
31-
env:
32-
DATABRICKS_HOST: ${{ vars.DBX_HOST }}
33-
DATABRICKS_CLIENT_ID: ${{ vars.DBX_SP_ID }}
34-
DATABRICKS_CLIENT_SECRET: ${{ secrets.DBX_SP_SECRET }}
35-
steps:
36-
- name: Checkout code
37-
uses: actions/checkout@v4
38-
39-
- name: Set up Databricks CLI
40-
uses: databricks/setup-cli@main
27+
check-staging-is-stable:
28+
name: Check staging still stable before deploy to prod
29+
runs-on: ubuntu-latest
30+
environment: staging
31+
env:
32+
DATABRICKS_HOST: ${{ vars.DBX_HOST }}
33+
DATABRICKS_CLIENT_ID: ${{ vars.DBX_SP_ID }}
34+
DATABRICKS_CLIENT_SECRET: ${{ secrets.DBX_SP_SECRET }}
35+
steps:
36+
- name: Checkout code
37+
uses: actions/checkout@v4
38+
39+
- name: Set up Databricks CLI
40+
uses: databricks/setup-cli@main
4141

4242
# The notebook will actually run both as set up atm but maybe its ok for now
43-
- name: Check Staging Integration Tests Before Allowing Prod Deploy
44-
run: |
45-
echo "running the integration yml test job integration_test_job.yml"
46-
databricks bundle run -t staging run_integration_tests
43+
- name: Check Staging Integration Tests Before Allowing Prod Deploy
44+
run: |
45+
echo "running the integration yml test job integration_test_job.yml"
46+
databricks bundle run -t staging integration_test_job
4747

.github/workflows/staging-cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ jobs:
5656
- name: Check Staging Integration Tests After Deploy
5757
run: |
5858
echo "running the integration yml test job integration_test_job.yml"
59-
databricks bundle run -t staging run_integration_tests
59+
databricks bundle run -t staging integration_test_job

.github/workflows/staging-pr.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,23 @@ jobs:
2424
- name: Validate Staging Target
2525
run: databricks bundle validate -t staging
2626

27-
check-dev-is-stable:
28-
name: Check dev still stable before deploy to staging
29-
runs-on: ubuntu-latest
30-
environment: dev
31-
env:
32-
DATABRICKS_HOST: ${{ vars.DBX_HOST }}
33-
DATABRICKS_CLIENT_ID: ${{ vars.DBX_SP_ID }}
34-
DATABRICKS_CLIENT_SECRET: ${{ secrets.DBX_SP_SECRET }}
35-
steps:
36-
- name: Checkout code
37-
uses: actions/checkout@v4
27+
check-dev-is-stable:
28+
name: Check dev still stable before deploy to staging
29+
runs-on: ubuntu-latest
30+
environment: dev
31+
env:
32+
DATABRICKS_HOST: ${{ vars.DBX_HOST }}
33+
DATABRICKS_CLIENT_ID: ${{ vars.DBX_SP_ID }}
34+
DATABRICKS_CLIENT_SECRET: ${{ secrets.DBX_SP_SECRET }}
35+
steps:
36+
- name: Checkout code
37+
uses: actions/checkout@v4
3838

39-
- name: Set up Databricks CLI
40-
uses: databricks/setup-cli@main
39+
- name: Set up Databricks CLI
40+
uses: databricks/setup-cli@main
4141

4242
# The notebook will actually run both as set up atm but maybe its ok for now
43-
- name: Check Dev Integration Tests Before Allowing Sing Deploy
44-
run: |
45-
echo "running the integration yml test job integration_test_job.yml"
46-
databricks bundle run -t dev run_integration_tests
43+
- name: Check Dev Integration Tests Before Allowing Sing Deploy
44+
run: |
45+
echo "running the integration yml test job integration_test_job.yml"
46+
databricks bundle run -t dev run_integration_tests

databricks.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ variables:
8282
staging_env_sp_id:
8383
default: "d588f2c8-0c0a-4ded-9da2-0663bf8dd994"
8484
prod_env_sp_id:
85-
default: "my-sp-id-jfsdkjhfjsdhfkjh"
85+
default: "811de200-7873-4ab3-a435-da3cddf13c36"
8686

8787
# for external package maybe qqqq i dont think we will export there are poetry bundle example repos if we decide to
8888
# artifacts:
@@ -92,17 +92,18 @@ variables:
9292

9393
# Deployment environments
9494
targets:
95+
# qqqq should we have a personal section for deploying to own space ???
9596
dev:
9697
# qqqq what is the process of developing and deploying dabs for own area.
9798
# qqqq would it actually be staging with features against folders !!!!???
98-
99+
# 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
99100
mode: development
100101
# Deploy under own user not service principle
101102
default: true
102103
# This is the the default deployment workspace
103104
workspace:
104105
# profile means in gets set values from [dev] section of databrickscfg useful on local machine, unneeded in databricks environment
105-
profile: dev
106+
# profile: dev
106107
# specify hosts in the databricks.yml not config for clarity
107108
# dev databricks host
108109
host: https://adb-295718430158257.17.azuredatabricks.net
@@ -146,8 +147,8 @@ targets:
146147
# Staging storage account
147148
storage_account: unifiedrptdeltalake
148149
permissions:
149-
- user_name: philip.tate@nhs.net
150-
level: CAN_MANAGE
150+
#- user_name: philip.tate@nhs.net
151+
# level: CAN_MANAGE
151152
- group_name: staging_env_users
152153
level: CAN_VIEW
153154
- service_principal_name: "${var.staging_env_sp_id}"
@@ -170,8 +171,8 @@ targets:
170171
# Prod storage account
171172
storage_account: unifiedrptdeltalake
172173
permissions:
173-
- user_name: philip.tate@nhs.net
174-
level: CAN_MANAGE
174+
#- user_name: philip.tate@nhs.net
175+
# level: CAN_MANAGE
175176
- group_name: prod_env_users
176177
level: CAN_VIEW
177178
- service_principal_name: "${var.prod_env_sp_id}"

0 commit comments

Comments
 (0)