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