diff --git a/tests/yamlparser/fixtures/job-parameter-precedence.xml b/tests/yamlparser/fixtures/job-parameter-precedence.xml new file mode 100644 index 000000000..3c1887941 --- /dev/null +++ b/tests/yamlparser/fixtures/job-parameter-precedence.xml @@ -0,0 +1,90 @@ + + + + Job N1<!-- Managed by Jenkins Job Builder --> + false + false + false + false + true + + + + + echo job=1 +# job*:1-project +echo param_1=1-project +# job1:2-job-param, job2:2-group-param, job3:2-group-param +echo param_2=2-job-param +# job1:3-project, job2: 3-group-param, job3: 3-group +echo param_3=3-project +# job*: 4-template +echo param_4=4-template +# job*: 5-defaults +echo param_5=5-defaults + + + + + + + + + + Job N2<!-- Managed by Jenkins Job Builder --> + false + false + false + false + true + + + + + echo job=2 +# job*:1-project +echo param_1=1-project +# job1:2-job-param, job2:2-group-param, job3:2-group-param +echo param_2=2-group-param +# job1:3-project, job2: 3-group-param, job3: 3-group +echo param_3=3-group-param +# job*: 4-template +echo param_4=4-template +# job*: 5-defaults +echo param_5=5-defaults + + + + + + + + + + Job N3<!-- Managed by Jenkins Job Builder --> + false + false + false + false + true + + + + + echo job=3 +# job*:1-project +echo param_1=1-project +# job1:2-job-param, job2:2-group-param, job3:2-group-param +echo param_2=2-group-param +# job1:3-project, job2: 3-group-param, job3: 3-group +echo param_3=3-group +# job*: 4-template +echo param_4=4-template +# job*: 5-defaults +echo param_5=5-defaults + + + + + + diff --git a/tests/yamlparser/fixtures/job-parameter-precedence.yaml b/tests/yamlparser/fixtures/job-parameter-precedence.yaml new file mode 100644 index 000000000..5729a1e52 --- /dev/null +++ b/tests/yamlparser/fixtures/job-parameter-precedence.yaml @@ -0,0 +1,50 @@ +- defaults: + name: global + param_1: '1-defaults' + param_2: '2-defaults' + param_3: '3-defaults' + param_4: '4-defaults' + param_5: '5-defaults' # Should be used. + +- job-template: + name: my-job-{num} + param_1: '1-template' + param_2: '2-template' + param_3: '3-template' + param_4: '4-template' # Should be used. + description: 'Job N{num}' + builders: + - shell: | + echo job={num} + # job*:1-project + echo param_1={param_1} + # job1:2-job-param, job2:2-group-param, job3:2-group-param + echo param_2={param_2} + # job1:3-project, job2: 3-group-param, job3: 3-group + echo param_3={param_3} + # job*: 4-template + echo param_4={param_4} + # job*: 5-defaults + echo param_5={param_5} + +- job-group: + name: my-job-group + jobs: + - my-job-{num}: + num: 2 + - my-job-{num}: + num: 3 + param_3: '3-group' # Should be used. + +- project: + name: test-project + param_1: '1-project' # Should be used. + param_2: '2-project' + param_3: '3-project' + jobs: + - my-job-{num}: + num: 1 + param_2: '2-job-param' # Should be used. + - my-job-group: + param_2: '2-group-param' # Should be used. + param_3: '3-group-param'