Debian Codegraph @

tests/yamlparser/job_fixtures/job-and-macro-expansions.yaml

raw symbols SCIP
1 # Example for tickets:
2 # https://storyboard.openstack.org/#!/story/2010588 Expand macros even if called without arguments
3 # https://storyboard.openstack.org/#!/story/2010963 Expand jobs the same way as job templates are expanded
4
5 # Demonstrate different style of variable expansion and inclusion tags for
6 # macros with and without parameters and for jobs versus job templates.
7
8 - builder:
9 name: builder-without-params
10 builders:
11 - shell: |
12 echo builder-without-params: should not be expanded: {{param}}
13 - shell: !include-raw-verbatim: job-and-macro-expansions.yaml.no-expand.inc
14
15 - builder:
16 name: builder-with-params
17 builders:
18 - shell: |
19 echo builder-with-params: should not be expanded: {{param}}
20 - shell: |
21 echo builder-with-params: should be expanded: {param}
22 - shell: !include-raw-verbatim: job-and-macro-expansions.yaml.no-expand.inc
23 - shell: !include-raw-expand: job-and-macro-expansions.yaml.expand.inc
24
25 - job:
26 name: sample-job
27 display-name: sample-job
28 builders:
29 - shell: |
30 echo sample-job: should not be expanded: {{param}}
31 - shell: !include-raw-verbatim: job-and-macro-expansions.yaml.no-expand.inc
32
33 - job-template:
34 name: sample-job-template
35 display-name: sample-job-template
36 builders:
37 - builder-without-params
38 - builder-with-params:
39 param: sample macro param value
40 - shell: |
41 echo sample-job-template: should not be expanded: {{param}}
42 - shell: |
43 echo sample-job-template: should be expanded: {param}
44 - shell: !include-raw-verbatim: job-and-macro-expansions.yaml.no-expand.inc
45 - shell: !include-raw-expand: job-and-macro-expansions.yaml.expand.inc
46
47 - project:
48 name: sample-project
49 param: sample project param value
50 jobs:
51 - sample-job-template