Skip to content

Instantly share code, notes, and snippets.

@seahrh
Created April 6, 2020 04:57
Show Gist options
  • Save seahrh/13edfbfdc077003a5c59b815695e53e6 to your computer and use it in GitHub Desktop.
Save seahrh/13edfbfdc077003a5c59b815695e53e6 to your computer and use it in GitHub Desktop.
Reusing data with YAML Anchors, Aliases and Merge Keys
defaults:
envs: &envs_defaults
ENVIRONMENT: prod
DATE: "{{ ds }}"
task: &task_defaults
type: my_type
envs: *envs_defaults
tasks:
- <<: *job_defaults
name: my_task_1
envs:
<<: *task_defaults
var_3: my_var_3
- type: docker
name: my_name
command: >
mycommand arg1 arg2
--import my_path
--version {{var.value.my_version}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment