Improve test job-and-macro-expansions

Change-Id: Ib4266fcbf3bc0e05aa1fe1407a34eaedfe8195bc
This commit is contained in:
Vsevolod Fedorov 2024-01-25 12:12:29 +03:00
parent 14804154e4
commit 11280dcad1
4 changed files with 22 additions and 22 deletions

@ -12,11 +12,11 @@
<scm class="hudson.scm.NullSCM"/> <scm class="hudson.scm.NullSCM"/>
<builders> <builders>
<hudson.tasks.Shell> <hudson.tasks.Shell>
<command>echo Should not be expanded: {param} <command>echo sample-job: should not be expanded: {param}
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
<hudson.tasks.Shell> <hudson.tasks.Shell>
<command>echo Should not be expanded: {param} <command>echo include-raw-verbatim: should not be expanded: {param}
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
@ -37,43 +37,43 @@
<scm class="hudson.scm.NullSCM"/> <scm class="hudson.scm.NullSCM"/>
<builders> <builders>
<hudson.tasks.Shell> <hudson.tasks.Shell>
<command>echo Should not be expanded: {param} <command>echo builder-without-params: should not be expanded: {param}
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
<hudson.tasks.Shell> <hudson.tasks.Shell>
<command>echo Should not be expanded: {param} <command>echo include-raw-verbatim: should not be expanded: {param}
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
<hudson.tasks.Shell> <hudson.tasks.Shell>
<command>echo Should not be expanded: {param} <command>echo builder-with-params: should not be expanded: {param}
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
<hudson.tasks.Shell> <hudson.tasks.Shell>
<command>echo Should be expanded: sample param value <command>echo builder-with-params: should be expanded: sample macro param value
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
<hudson.tasks.Shell> <hudson.tasks.Shell>
<command>echo Should not be expanded: {param} <command>echo include-raw-verbatim: should not be expanded: {param}
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
<hudson.tasks.Shell> <hudson.tasks.Shell>
<command>echo Should be expanded: sample param value <command>echo include-raw-expand: should be expanded: sample macro param value
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
<hudson.tasks.Shell> <hudson.tasks.Shell>
<command>echo Should not be expanded: {param} <command>echo sample-job-template: should not be expanded: {param}
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
<hudson.tasks.Shell> <hudson.tasks.Shell>
<command>echo Should be expanded: sample param value <command>echo sample-job-template: should be expanded: sample project param value
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
<hudson.tasks.Shell> <hudson.tasks.Shell>
<command>echo Should not be expanded: {param} <command>echo include-raw-verbatim: should not be expanded: {param}
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
<hudson.tasks.Shell> <hudson.tasks.Shell>
<command>echo Should be expanded: sample param value <command>echo include-raw-expand: should be expanded: sample project param value
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>

@ -9,16 +9,16 @@
name: builder-without-params name: builder-without-params
builders: builders:
- shell: | - shell: |
echo Should not be expanded: {{param}} echo builder-without-params: should not be expanded: {{param}}
- shell: !include-raw-verbatim: job-and-macro-expansions.yaml.no-expand.inc - shell: !include-raw-verbatim: job-and-macro-expansions.yaml.no-expand.inc
- builder: - builder:
name: builder-with-params name: builder-with-params
builders: builders:
- shell: | - shell: |
echo Should not be expanded: {{param}} echo builder-with-params: should not be expanded: {{param}}
- shell: | - shell: |
echo Should be expanded: {param} echo builder-with-params: should be expanded: {param}
- shell: !include-raw-verbatim: job-and-macro-expansions.yaml.no-expand.inc - shell: !include-raw-verbatim: job-and-macro-expansions.yaml.no-expand.inc
- shell: !include-raw-expand: job-and-macro-expansions.yaml.expand.inc - shell: !include-raw-expand: job-and-macro-expansions.yaml.expand.inc
@ -27,7 +27,7 @@
display-name: sample-job display-name: sample-job
builders: builders:
- shell: | - shell: |
echo Should not be expanded: {{param}} echo sample-job: should not be expanded: {{param}}
- shell: !include-raw-verbatim: job-and-macro-expansions.yaml.no-expand.inc - shell: !include-raw-verbatim: job-and-macro-expansions.yaml.no-expand.inc
- job-template: - job-template:
@ -36,16 +36,16 @@
builders: builders:
- builder-without-params - builder-without-params
- builder-with-params: - builder-with-params:
param: sample param value param: sample macro param value
- shell: | - shell: |
echo Should not be expanded: {{param}} echo sample-job-template: should not be expanded: {{param}}
- shell: | - shell: |
echo Should be expanded: {param} echo sample-job-template: should be expanded: {param}
- shell: !include-raw-verbatim: job-and-macro-expansions.yaml.no-expand.inc - shell: !include-raw-verbatim: job-and-macro-expansions.yaml.no-expand.inc
- shell: !include-raw-expand: job-and-macro-expansions.yaml.expand.inc - shell: !include-raw-expand: job-and-macro-expansions.yaml.expand.inc
- project: - project:
name: sample-project name: sample-project
param: sample param value param: sample project param value
jobs: jobs:
- sample-job-template - sample-job-template

@ -1 +1 @@
echo Should be expanded: {param} echo include-raw-expand: should be expanded: {param}

@ -1 +1 @@
echo Should not be expanded: {param} echo include-raw-verbatim: should not be expanded: {param}