jenkins-job-builder/tests/yamlparser/job_fixtures/jinja-include03.yaml
Thomas Bechtold c5fce78f71 Story 2011116: recursively find jinja2 vars from templates
Don't only try to find undeclared variables from the current template
but also recursively find undeclared variables from included and
imported jinja2 templates.
Otherwise included/imported templates with variables can not be used.

Change-Id: Iebdce1accf74f27901d80a41c85624ba819bf2a8
2024-05-07 07:05:19 +02:00

19 lines
345 B
YAML

- defaults:
name: global
globalvar1: "global-var-1"
globalvar2: "global-var-2"
- project:
name: "test-project"
var1: !j2: |
{% include 'jinja-include03.yaml.inc' %}
jobs:
- "job-{globalvar1}"
- job-template:
name: "job-{globalvar1}"
description: |
{var1}
{globalvar1}
{globalvar2}