b27399c477
Jinja templates are not deep-copyable so they cannot be used in "defautls" sections or to pick defualts for job groups or projects. This works around the issue by waiting until we render the template to construct the template itself. Story: 2006431 Task: 36337 Change-Id: Ief31fdaac06bb14d0aaba71c8c0e658a7f861671
20 lines
457 B
YAML
20 lines
457 B
YAML
# 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}"
|