-
Notifications
You must be signed in to change notification settings - Fork 1
88 lines (78 loc) · 2.84 KB
/
cicd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: 'Build and Deploy to Databricks'
on:
workflow_dispatch:
inputs:
projectFolders:
description: 'List of folders to run'
required: true
type: choice
options:
- raw
- data_product
jobs:
# RAW
deploy:
name: "Build and Deploy Bundle RAW"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pip install poetry
# Download the Databricks CLI.
# See https://github.com/databricks/setup-cli
- uses: databricks/setup-cli@main
- name: Validation
run: |
pwd
ls -la
databricks bundle validate
#working-directory: raw #./${{ github.event.inputs.projectFolders }}/
env:
DATABRICKS_TOKEN: ${{ secrets.SP_TOKEN }}
DATABRICKS_BUNDLE_ENV: dev
# Deploy the bundle to the "qa" target as defined
# in the bundle's settings file.
- name: Deploy
run: databricks bundle deploy -c 1011-082929-h6d1tk5
#working-directory: ./${{ github.event.inputs.projectFolders }}/
#working-directory: raw #./${{ github.event.inputs.projectFolders }}/
env:
DATABRICKS_TOKEN: ${{ secrets.SP_TOKEN }}
DATABRICKS_BUNDLE_ENV: dev
# # Data Product
# deploy_data_product:
# name: "Build and Deploy Bundle Data Product"
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v4
#
# - run: pip install poetry
#
# # Download the Databricks CLI.
# # See https://github.com/databricks/setup-cli
# - uses: databricks/setup-cli@main
#
# - name: Validation
# run: |
# pwd
# ls -la
# databricks bundle validate
# #working-directory: ./${{ github.event.inputs.projectFolders }}/
# working-directory: data_product #./${{ github.event.inputs.projectFolders }}/
# env:
# DATABRICKS_TOKEN: ${{ secrets.SP_TOKEN }}
# DATABRICKS_BUNDLE_ENV: dev
#
# # Deploy the bundle to the "qa" target as defined
# # in the bundle's settings file.
# - name: Deploy
# run: |
# databricks bundle deploy -c 1011-082929-h6d1tk5
# ls -la
# cd ./dist && ls -la
# #working-directory: ./${{ github.event.inputs.projectFolders }}/
# working-directory: data_product #./${{ github.event.inputs.projectFolders }}/
# env:
# DATABRICKS_TOKEN: ${{ secrets.SP_TOKEN }}
# DATABRICKS_BUNDLE_ENV: dev
#