[CPS] Jobs for newdelhi branch
[ci-management.git] / jjb / global-templates-script.yaml
1 ---
2 - job-template:
3     #
4     # job template for verifying gerrit changeset by shell script
5     #
6     # Required Variables:
7     #   project-name:   name of project
8     #   area:           area of project covered with this verification job
9     #   project:        name of scm repository to work on
10     #   stream:         name of stream used (set the same as branch if you're not sure)
11     #   branch:         git branch to work on
12     #   script:         build script to execute
13     # Optional Variables:
14     #   pattern:          trigger job only if modification covered file in pattern
15     #   build-node:     label(flavor) of jenkins slave
16     name: "{project-name}-{stream}-{area}-verify-shell"
17     node: "{build-node}"
18     type: freestyle
19     concurrent: true
20     disable-job: false
21     disabled: "{disable-job}"
22
23     pattern: "**"
24
25     parameters:
26       - lf-infra-parameters:
27           branch: "{branch}"
28           project: "{project}"
29           stream: "{stream}"
30           lftools-version: "{lftools-version}"
31
32     scm:
33       - gerrit-trigger-scm:
34           refspec: "$GERRIT_REFSPEC"
35           submodule-recursive: "{submodule-recursive}"
36           choosing-strategy: "gerrit"
37
38     triggers:
39       - gerrit-trigger-patch-submitted:
40           server: "{server-name}"
41           project: "{project}"
42           branch: "{branch}"
43           files: "{pattern}"
44
45     wrappers:
46       - infra-wrappers:
47           build-timeout: "{build-timeout}"
48
49     builders:
50       - shell: "{script}"
51
52     publishers:
53       - lf-infra-publish
54
55 - job-template:
56     # Job template for 2 scm and script trigger
57     #
58     # Required Variables:
59     #   branch:         git branch
60     #   build-node:     what build node to run on
61     #   script:         build script to execute
62     #   extra-project:  extra gerrit project to checkout
63     #   extra-refspec:  refspec for the extra project
64     #   extra-branch:   branch to checkout for the extra project
65     #   checkout-dir:   directory to checkout the extra project to
66     #                     DO NOT SET THIS TO anything that translates to
67     #                     $WORKSPACE as it will destroy the initial
68     #                     project checkout
69
70     name: "{project-name}-{stream}-two-scm-verify-script"
71
72     project-type: freestyle
73     concurrent: true
74     node: "{build-node}"
75
76     properties:
77       - infra-properties:
78           build-days-to-keep: "{build-days-to-keep}"
79
80     parameters:
81       - infra-parameters:
82           project: "{project}"
83           branch: "{branch}"
84           refspec: "refs/heads/{branch}"
85           artifacts: "{archive-artifacts}"
86       - maven-exec:
87           maven-version: "{maven-version}"
88
89     scm:
90       - gerrit-trigger-scm:
91           refspec: "$GERRIT_REFSPEC"
92           choosing-strategy: "gerrit"
93           submodule-recursive: "{submodule-recursive}"
94       - git-extra-project:
95           project: "{extra-project}"
96           refspec: "{extra-refspec}"
97           branch: "{extra-branch}"
98           checkout-dir: "{checkout-dir}"
99
100     wrappers:
101       - infra-wrappers:
102           build-timeout: "{build-timeout}"
103
104     triggers:
105       - gerrit-trigger-patch-submitted:
106           server: "{server-name}"
107           project: "{project}"
108           branch: "{branch}"
109           files: "**"
110
111     builders:
112       - lf-infra-pre-build
113       - provide-maven-settings:
114           global-settings-file: "global-settings"
115           settings-file: "{mvn-settings}"
116       # make sure maven gets installed / setup
117       - maven-target:
118           maven-version: "{maven-version}"
119           goals: "--version"
120           settings: "{mvn-settings}"
121           settings-type: cfp
122           global-settings: "global-settings"
123           global-settings-type: cfp
124       - shell: "{script}"
125
126     publishers:
127       - lf-infra-publish
128
129 - job-template:
130     # Job template for two scm and script trigger - for docker merge
131     #
132     # Required Variables:
133     #   branch:         git branch
134     #   build-node:     what build node to run on
135     #   script:         build script to execute
136
137     name: "{project-name}-{stream}-two-scm-merge-docker-script"
138
139     project-type: freestyle
140     concurrent: true
141     node: "{build-node}"
142
143     properties:
144       - infra-properties:
145           build-days-to-keep: "{build-days-to-keep}"
146
147     parameters:
148       - infra-parameters:
149           project: "{project}"
150           branch: "{branch}"
151           refspec: "refs/heads/{branch}"
152           artifacts: "{archive-artifacts}"
153       - maven-exec:
154           maven-version: "{maven-version}"
155
156     scm:
157       - gerrit-trigger-scm:
158           refspec: ""
159           choosing-strategy: "default"
160           submodule-recursive: "{submodule-recursive}"
161       - git-extra-project:
162           project: "{extra-project}"
163           refspec: "{extra-refspec}"
164           branch: "{extra-branch}"
165           checkout-dir: "{checkout-dir}"
166
167     wrappers:
168       - infra-wrappers:
169           build-timeout: "{build-timeout}"
170
171     triggers:
172       - gerrit-trigger-patch-merged:
173           server: "{server-name}"
174           project: "{project}"
175           branch: "{branch}"
176           files: "**"
177
178     builders:
179       - lf-infra-pre-build
180       - provide-maven-settings:
181           global-settings-file: "global-settings"
182           settings-file: "{mvn-settings}"
183       - docker-login
184       # make sure maven gets installed / setup
185       - maven-target:
186           maven-version: "{maven-version}"
187           goals: "--version"
188           settings: "{mvn-settings}"
189           settings-type: cfp
190           global-settings: "global-settings"
191           global-settings-type: cfp
192       - shell: "{script}"
193
194     publishers:
195       - lf-infra-publish
196
197 - job-template:
198     # Job template for two scm and script trigger - for docker daily release
199     #
200     # Required Variables:
201     #   branch:         git branch
202     #   build-node:     what build node to run on
203     #   script:         build script to execute
204
205     name: "{project-name}-{stream}-two-scm-release-docker-script-manual"
206
207     project-type: freestyle
208     concurrent: true
209     node: "{build-node}"
210
211     properties:
212       - infra-properties:
213           build-days-to-keep: "{build-days-to-keep}"
214
215     parameters:
216       - infra-parameters:
217           project: "{project}"
218           branch: "{branch}"
219           refspec: "refs/heads/{branch}"
220           artifacts: "{archive-artifacts}"
221       - maven-exec:
222           maven-version: "{maven-version}"
223
224     scm:
225       - gerrit-trigger-scm:
226           refspec: ""
227           choosing-strategy: "default"
228           submodule-recursive: "{submodule-recursive}"
229       - git-extra-project:
230           project: "{extra-project}"
231           refspec: "{extra-refspec}"
232           branch: "{extra-branch}"
233           checkout-dir: "{checkout-dir}"
234
235     wrappers:
236       - infra-wrappers:
237           build-timeout: "{build-timeout}"
238
239     triggers:
240       - gerrit-trigger-release-manually:
241           server: "{server-name}"
242           project: "{project}"
243           branch: "{branch}"
244
245     builders:
246       - lf-infra-pre-build
247       - provide-maven-settings:
248           global-settings-file: "global-settings"
249           settings-file: "{mvn-settings}"
250       - docker-login
251       # make sure maven gets installed / setup
252       - maven-target:
253           maven-version: "{maven-version}"
254           goals: "--version"
255           settings: "{mvn-settings}"
256           settings-type: cfp
257           global-settings: "global-settings"
258           global-settings-type: cfp
259       - shell: "{script}"
260
261     publishers:
262       - lf-infra-publish