jenkins-job-builder/tests/yamlparser/fixtures/template_default_variables.yaml
Darragh Bailey a54e623dc7 Document template variable default values
Document the ability to define default values for template variables
within the template definition thus removing the need to always having
to set such values in job definitions.

Change-Id: If4d8bfd898066b8e6350ed22f0c97eb939ae4348
2016-02-20 18:20:51 +00:00

26 lines
720 B
YAML

- project:
name: template_variable_defaults
jobs:
- 'template-variable-defaults-{num}':
num: 1
disabled_var: true
- 'template-variable-defaults-{num}':
test_var: Goodbye World
num: 2
- job-template:
# template specific defaults
# empty value causes disabled_var to be ignored internally
disabled_var:
test_var: Hello World
type: periodic
# template settings
name: 'template-variable-defaults-{num}-{type}'
id: 'template-variable-defaults-{num}'
disabled: '{obj:disabled_var}'
builders:
- shell: |
echo "Job Name: template-variable-defaults-{num}-{type}"
echo "Variable: {test_var}"