6bc5398336
The tag provides Jinja templating capabilities for generating parts of YAML structures. Two potential use cases are provided as test cases and are linked in the documentation. The new tag should also help address some use cases people were asking about, like here: https://groups.google.com/g/jenkins-job-builder/c/HkVZVuBDlKM. Change-Id: I96392e42c3c79a9be0a8f736506908701251dd62
20 lines
390 B
YAML
20 lines
390 B
YAML
- job-template:
|
|
name: 'test-job-{variant}'
|
|
properties: !j2-yaml: |
|
|
- rebuild
|
|
{% if discard_old_builds|default %}
|
|
- build-discarder:
|
|
days-to-keep: 7
|
|
{% endif %}
|
|
|
|
- project:
|
|
name: test-project
|
|
|
|
jobs:
|
|
- 'test-job-{variant}':
|
|
variant: abc
|
|
|
|
- 'test-job-{variant}':
|
|
variant: def
|
|
discard_old_builds: true
|