dbx
dbx copied to clipboard
Using include within configuration as yaml file.
trafficstars
Hey, so lets say i have something like this:
include/notifications.yaml
# start of the file, notice the spaces here. This spaces are how many spaces would be required in deployment.yaml.
email_notifications:
on_start: [ "email1" ]
on_success: [ "email2" ]
on_failure: [ "email3" ]
deployment.yaml
- name: "workflow_name"
job_clusters:
- job_cluster_key: "cluster_key"
{% include 'include/notifications.yaml' %}
tasks: ...
So the only way that i can deploy with include inside yaml files is when i include spaces in include files, while i put include statements in deployment.yaml without indendtation. Can u test this out? Since i would like to use something like this, i mean i guess everyone would:
include/notifications.yaml
# Now inside include file, i start from beginning without indentation.
email_notifications:
on_start: [ "email1" ]
on_success: [ "email2" ]
on_failure: [ "email3" ]
deployment.yaml
- name: "workflow_name"
job_clusters:
- job_cluster_key: "cluster_key"
{% include 'include/notifications.yaml' %} # now its on level for a workflow, not at beginning of a yaml file.
tasks: ...
Hi, does anyone know if this feature will be reviewed? I want to apply DRY principles with my .yaml templates and this option will be awesome.