18efe5066b
Expand variables inside macros without parameters and jobs the same way as they are expanded inside macros with parameters and job templates. Make tags behave inside macros without parameters and jobs the same way as they are expanded inside macros with parameters and job templates. Update or fix affected tests. Story: 2010588 Story: 2010963 Story: 2010535 Task: 47394 Task: 49069 Task: 47151 Change-Id: Ie05ae6aa386c62ebbf68dd3e2c7001a4e444a47a
33 lines
766 B
YAML
33 lines
766 B
YAML
# https://storyboard.openstack.org/#!/story/2010535
|
|
# Fixed: Bug: JJB doesn't expand macro in case of usage without arguments
|
|
# String templates in macro calls without parameters are NOT expanded.
|
|
# Jinja2 templates in macro calls without parameters ARE expanded.
|
|
|
|
- parameter:
|
|
name: p_PARAM_1
|
|
parameters:
|
|
- string:
|
|
name: PARAM_1
|
|
# Not expanded:
|
|
default: '{default|my_default}'
|
|
|
|
- parameter:
|
|
name: p_PARAM_2
|
|
parameters:
|
|
- string:
|
|
name: PARAM_2
|
|
# Expanded to default value:
|
|
default: !j2: '{{ default | default("my_default") }}'
|
|
|
|
# job definition
|
|
- job-template:
|
|
name: sample-job
|
|
parameters:
|
|
- p_PARAM_1
|
|
- p_PARAM_2
|
|
|
|
- project:
|
|
name: sample-project
|
|
jobs:
|
|
- sample-job
|