Hello,
My team and I are experimenting with bundles, we follow the pattern of having one main file Databricks.yml and each job definition specified in a separate yaml for modularization.
We wonder if it is possible to select from the main Databricks.yml which jobs resources are deploy per target. In specific, we have a job called test_<name of the application>, which contain all the unit testing and integration testing. Ideally, this test job would only be deploy in development alongside the rest of the resources, while in production the test job would be excluded.
Below an example of the Databricks.yml.
# yaml-language-server: $schema=..\..\bundle_config_schema.json
bundle:
name: app_name
include:
- resources/*.yml
- tests/test_job.yml
targets:
dev:
# We know this is not possible but ideally something like this would be brilliant
# include:
# - resources/*.yml
# - tests/test_job.yml
default: true
variables:
slack_web_hoook: 111111111222222222222222
catalog: catalog_name
storage_account_name: storege_account_name
mode: development
workspace:
host: https://adb-******.azuredatabricks.net
prod:
# We know this is not possible but something like this would be brilliant
# exclude:
# - "tests/*"
variables:
slack_web_hoook: 1111112222333344444
catalog: _catalog_name
storage_account_name: storage_account_name
mode: production
workspace:
host: https://adb-***************.azuredatabricks.net
root_path: /Shared/.bundle/prod/${bundle.name}
run_as:
user_name: user.user@email
Is there any alternative better than defining the whole job resource within this file?