-
Notifications
You must be signed in to change notification settings - Fork 164
Expand file tree
/
Copy pathscript
More file actions
30 lines (23 loc) · 1.56 KB
/
script
File metadata and controls
30 lines (23 loc) · 1.56 KB
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
trace $CLI bundle validate
trace $CLI bundle deploy
trace errcode $CLI bundle plan
trace musterr $CLI bundle destroy --auto-approve >>out.$DATABRICKS_CLI_DEPLOYMENT.txt 2>&1
# Changing the catalog name, deploy must fail because pipeline will be recreated
update_file.py resources/pipeline.yml 'catalog: main' 'catalog: mainnew'
trace errcode $CLI bundle plan >>out.$DATABRICKS_CLI_DEPLOYMENT.txt 2>&1
trace musterr $CLI bundle deploy >>out.$DATABRICKS_CLI_DEPLOYMENT.txt 2>&1
# Changing the schema name, deploy must fail because schema will be recreated
update_file.py resources/schema.yml 'name: test-schema' 'name: test-schema-new'
trace errcode $CLI bundle plan >>out.$DATABRICKS_CLI_DEPLOYMENT.txt 2>&1
trace musterr $CLI bundle deploy >>out.$DATABRICKS_CLI_DEPLOYMENT.txt 2>&1
# Removing the prevent_destroy, deploy must succeed
update_file.py resources/pipeline.yml 'prevent_destroy: true' 'prevent_destroy: false'
update_file.py resources/schema.yml 'prevent_destroy: true' 'prevent_destroy: false'
trace errcode $CLI bundle plan >>out.$DATABRICKS_CLI_DEPLOYMENT.txt 2>&1
trace $CLI bundle deploy --auto-approve >>out.$DATABRICKS_CLI_DEPLOYMENT.txt 2>&1
update_file.py resources/pipeline.yml 'prevent_destroy: false' 'prevent_destroy: true'
update_file.py resources/schema.yml 'prevent_destroy: false' 'prevent_destroy: true'
# Removing the pipeline and schema, deploy must succeed
rm resources/pipeline.yml resources/schema.yml
trace errcode $CLI bundle plan >>out.$DATABRICKS_CLI_DEPLOYMENT.txt 2>&1
trace $CLI bundle deploy --auto-approve >>out.$DATABRICKS_CLI_DEPLOYMENT.txt 2>&1