Apex: enable RPM build on master verify
[releng.git] / jjb / escalator / escalator.yaml
1 ---
2 - project:
3     name: 'escalator'
4
5     project: 'escalator'
6
7     #####################################
8     # branch definitions
9     #####################################
10     stream:
11       - master:
12           branch: '{stream}'
13           gs-pathname: ''
14           disabled: false
15
16     #####################################
17     # phases
18     #####################################
19     phase:
20       - 'basic':
21           slave-label: 'opnfv-build-centos'
22       - 'build':
23           slave-label: 'opnfv-build-centos'
24
25     #####################################
26     # jobs
27     #####################################
28     jobs:
29       - 'escalator-verify-{stream}'
30       - 'escalator-verify-{phase}-{stream}'
31       - 'escalator-merge-{stream}'
32       - 'escalator-merge-{phase}-{stream}'
33
34 #####################################
35 # job templates
36 #####################################
37 - job-template:
38     name: 'escalator-verify-{stream}'
39
40     project-type: multijob
41
42     disabled: false
43
44     concurrent: true
45
46     properties:
47       - logrotate-default
48       - throttle:
49           enabled: true
50           max-total: 4
51           option: 'project'
52
53     scm:
54       - git-scm-gerrit
55
56     wrappers:
57       - ssh-agent-wrapper
58       - timeout:
59           timeout: 360
60           fail: true
61
62     triggers:
63       - gerrit:
64           server-name: 'gerrit.opnfv.org'
65           trigger-on:
66             - patchset-created-event:
67                 exclude-drafts: 'false'
68                 exclude-trivial-rebase: 'false'
69                 exclude-no-code-change: 'false'
70             - draft-published-event
71             - comment-added-contains-event:
72                 comment-contains-value: 'recheck'
73             - comment-added-contains-event:
74                 comment-contains-value: 'reverify'
75           projects:
76             - project-compare-type: 'ANT'
77               project-pattern: '{project}'
78               branches:
79                 - branch-compare-type: 'ANT'
80                   branch-pattern: '**/{branch}'
81               disable-strict-forbidden-file-verification: 'true'
82               forbidden-file-paths:
83                 - compare-type: ANT
84                   pattern: 'docs/**|.gitignore'
85           readable-message: true
86
87     parameters:
88       - project-parameter:
89           project: '{project}'
90           branch: '{branch}'
91       - 'opnfv-build-defaults'
92       - 'escalator-defaults':
93           gs-pathname: '{gs-pathname}'
94
95     builders:
96       - description-setter:
97           description: "Built on $NODE_NAME"
98       - multijob:
99           name: basic
100           condition: SUCCESSFUL
101           projects:
102             - name: 'escalator-verify-basic-{stream}'
103               current-parameters: false
104               predefined-parameters: |
105                 BRANCH=$BRANCH
106                 GERRIT_REFSPEC=$GERRIT_REFSPEC
107                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
108                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
109               node-parameters: false
110               kill-phase-on: FAILURE
111               abort-all-job: true
112       - multijob:
113           name: build
114           condition: SUCCESSFUL
115           projects:
116             - name: 'escalator-verify-build-{stream}'
117               current-parameters: false
118               predefined-parameters: |
119                 BRANCH=$BRANCH
120                 GERRIT_REFSPEC=$GERRIT_REFSPEC
121                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
122                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
123               node-parameters: false
124               kill-phase-on: FAILURE
125               abort-all-job: true
126
127 - job-template:
128     name: 'escalator-verify-{phase}-{stream}'
129
130     disabled: '{obj:disabled}'
131
132     concurrent: true
133
134     scm:
135       - git-scm-gerrit
136
137     wrappers:
138       - ssh-agent-wrapper
139       - timeout:
140           timeout: 360
141           fail: true
142
143     parameters:
144       - project-parameter:
145           project: '{project}'
146           branch: '{branch}'
147       - '{slave-label}-defaults'
148       - 'escalator-defaults':
149           gs-pathname: '{gs-pathname}'
150
151     builders:
152       - description-setter:
153           description: "Built on $NODE_NAME"
154       - '{project}-verify-{phase}-macro'
155
156 - job-template:
157     name: 'escalator-merge-{stream}'
158
159     project-type: multijob
160
161     disabled: false
162
163     concurrent: true
164
165     properties:
166       - logrotate-default
167       - throttle:
168           enabled: true
169           max-total: 4
170           option: 'project'
171
172     scm:
173       - git-scm-gerrit
174
175     wrappers:
176       - ssh-agent-wrapper
177       - timeout:
178           timeout: 360
179           fail: true
180
181     triggers:
182       - gerrit:
183           server-name: 'gerrit.opnfv.org'
184           trigger-on:
185             - change-merged-event
186             - comment-added-contains-event:
187                 comment-contains-value: 'remerge'
188           projects:
189             - project-compare-type: 'ANT'
190               project-pattern: '{project}'
191               branches:
192                 - branch-compare-type: 'ANT'
193                   branch-pattern: '**/{branch}'
194               disable-strict-forbidden-file-verification: 'true'
195               forbidden-file-paths:
196                 - compare-type: ANT
197                   pattern: 'docs/**|.gitignore'
198           readable-message: true
199
200     parameters:
201       - project-parameter:
202           project: '{project}'
203           branch: '{branch}'
204       - 'opnfv-build-defaults'
205       - 'escalator-defaults':
206           gs-pathname: '{gs-pathname}'
207
208     builders:
209       - description-setter:
210           description: "Built on $NODE_NAME"
211       - multijob:
212           name: basic
213           condition: SUCCESSFUL
214           projects:
215             - name: 'escalator-merge-basic-{stream}'
216               current-parameters: false
217               predefined-parameters: |
218                 BRANCH=$BRANCH
219                 GERRIT_REFSPEC=$GERRIT_REFSPEC
220                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
221                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
222               node-parameters: false
223               kill-phase-on: FAILURE
224               abort-all-job: true
225       - multijob:
226           name: build
227           condition: SUCCESSFUL
228           projects:
229             - name: 'escalator-merge-build-{stream}'
230               current-parameters: false
231               predefined-parameters: |
232                 BRANCH=$BRANCH
233                 GERRIT_REFSPEC=$GERRIT_REFSPEC
234                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
235                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
236               node-parameters: false
237               kill-phase-on: FAILURE
238               abort-all-job: true
239
240 - job-template:
241     name: 'escalator-merge-{phase}-{stream}'
242
243     disabled: '{obj:disabled}'
244
245     concurrent: true
246
247     scm:
248       - git-scm
249
250     wrappers:
251       - ssh-agent-wrapper
252       - timeout:
253           timeout: 360
254           fail: true
255
256     parameters:
257       - project-parameter:
258           project: '{project}'
259           branch: '{branch}'
260       - '{slave-label}-defaults'
261       - 'escalator-defaults':
262           gs-pathname: '{gs-pathname}'
263
264     builders:
265       - description-setter:
266           description: "Built on $NODE_NAME"
267       - '{project}-merge-{phase}-macro'
268
269 #####################################
270 # builder macros
271 #####################################
272 - builder:
273     name: 'escalator-verify-basic-macro'
274     builders:
275       - shell:
276           !include-raw: ./escalator-basic.sh
277
278 - builder:
279     name: 'escalator-verify-build-macro'
280     builders:
281       - shell:
282           !include-raw: ./escalator-build.sh
283
284 - builder:
285     name: 'escalator-merge-basic-macro'
286     builders:
287       - shell:
288           !include-raw: ./escalator-basic.sh
289
290 # yamllint disable rule:indentation
291 - builder:
292     name: 'escalator-merge-build-macro'
293     builders:
294       - shell:
295           !include-raw:
296               - ./escalator-build.sh
297               - ./escalator-upload-artifact.sh
298 # yamllint enable rule:indentation
299
300 #####################################
301 # parameter macros
302 #####################################
303 - parameter:
304     name: 'escalator-defaults'
305     parameters:
306       - string:
307           name: BUILD_DIRECTORY
308           default: $WORKSPACE/build_output
309           description: "Directory where the build artifact will be located upon the completion of the build."
310       - string:
311           name: CACHE_DIRECTORY
312           default: $HOME/opnfv/cache/$INSTALLER_TYPE
313           description: "Directory where the cache to be used during the build is located."
314       - string:
315           name: GS_URL
316           default: artifacts.opnfv.org/$PROJECT{gs-pathname}
317           description: "URL to Google Storage."