summaryrefslogtreecommitdiffstats
path: root/tests/yamlparser/fixtures/jinja-string03.yaml
blob: 28b6a1cf3cbb073f82d3a8f33b22f7ad4baf1cb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Make sure Jinja subsittuions work from within "defaults"
- defaults:
    name: test-defaults
    test_var:
      !j2: "{% for x in [1, 2, 3] %}{{ x }}{% endfor %}"

- project:
    name: test-proj
    jobs:
      - test-jobs-{argument}:
          argument:
            - 1

# This type of variable propagation only works in job templates.
- job-template:
    name: test-jobs-{argument}
    defaults: test-defaults
    builders:
      - shell: "{test_var}"