041a41f914e0d68d3b05ffa48159847a2dc769b3
[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                 disable-strict-forbidden-file-verification: 'true'
77                 forbidden-file-paths:
78                   - compare-type: ANT
79                     pattern: 'docs/**|.gitignore'
80             readable-message: true
81
82     parameters:
83         - project-parameter:
84             project: '{project}'
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                     BRANCH=$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                     BRANCH=$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             branch: '{branch}'
142         - '{slave-label}-defaults'
143         - 'escalator-defaults':
144             gs-pathname: '{gs-pathname}'
145
146     builders:
147         - description-setter:
148             description: "Built on $NODE_NAME"
149         - '{project}-verify-{phase}-macro'
150
151 - job-template:
152     name: 'escalator-merge-{stream}'
153
154     project-type: multijob
155
156     disabled: false
157
158     concurrent: true
159
160     properties:
161         - logrotate-default
162         - throttle:
163             enabled: true
164             max-total: 4
165             option: 'project'
166
167     scm:
168         - git-scm-gerrit
169
170     wrappers:
171         - ssh-agent-wrapper
172         - timeout:
173             timeout: 360
174             fail: true
175
176     triggers:
177         - gerrit:
178             server-name: 'gerrit.opnfv.org'
179             trigger-on:
180                 - change-merged-event
181                 - comment-added-contains-event:
182                     comment-contains-value: 'remerge'
183             projects:
184               - project-compare-type: 'ANT'
185                 project-pattern: '{project}'
186                 branches:
187                   - branch-compare-type: 'ANT'
188                     branch-pattern: '**/{branch}'
189                 disable-strict-forbidden-file-verification: 'true'
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             branch: '{branch}'
199         - 'opnfv-build-defaults'
200         - 'escalator-defaults':
201             gs-pathname: '{gs-pathname}'
202
203     builders:
204         - description-setter:
205             description: "Built on $NODE_NAME"
206         - multijob:
207             name: basic
208             condition: SUCCESSFUL
209             projects:
210                 - name: 'escalator-merge-basic-{stream}'
211                   current-parameters: false
212                   predefined-parameters: |
213                     BRANCH=$BRANCH
214                     GERRIT_REFSPEC=$GERRIT_REFSPEC
215                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
216                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
217                   node-parameters: false
218                   kill-phase-on: FAILURE
219                   abort-all-job: true
220         - multijob:
221             name: build
222             condition: SUCCESSFUL
223             projects:
224                 - name: 'escalator-merge-build-{stream}'
225                   current-parameters: false
226                   predefined-parameters: |
227                     BRANCH=$BRANCH
228                     GERRIT_REFSPEC=$GERRIT_REFSPEC
229                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
230                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
231                   node-parameters: false
232                   kill-phase-on: FAILURE
233                   abort-all-job: true
234
235 - job-template:
236     name: 'escalator-merge-{phase}-{stream}'
237
238     disabled: '{obj:disabled}'
239
240     concurrent: true
241
242     scm:
243         - git-scm
244
245     wrappers:
246         - ssh-agent-wrapper
247         - timeout:
248             timeout: 360
249             fail: true
250
251     parameters:
252         - project-parameter:
253             project: '{project}'
254             branch: '{branch}'
255         - '{slave-label}-defaults'
256         - 'escalator-defaults':
257             gs-pathname: '{gs-pathname}'
258
259     builders:
260         - description-setter:
261             description: "Built on $NODE_NAME"
262         - '{project}-merge-{phase}-macro'
263 #####################################
264 # builder macros
265 #####################################
266 - builder:
267     name: 'escalator-verify-basic-macro'
268     builders:
269         - shell:
270             !include-raw: ./escalator-basic.sh
271
272 - builder:
273     name: 'escalator-verify-build-macro'
274     builders:
275         - shell:
276             !include-raw: ./escalator-build.sh
277
278 - builder:
279     name: 'escalator-merge-basic-macro'
280     builders:
281         - shell:
282             !include-raw: ./escalator-basic.sh
283
284 - builder:
285     name: 'escalator-merge-build-macro'
286     builders:
287         - shell:
288             !include-raw:
289                 - ./escalator-build.sh
290                 - ./escalator-upload-artifact.sh
291 #####################################
292 # parameter macros
293 #####################################
294 - parameter:
295     name: 'escalator-defaults'
296     parameters:
297         - string:
298             name: BUILD_DIRECTORY
299             default: $WORKSPACE/build_output
300             description: "Directory where the build artifact will be located upon the completion of the build."
301         - string:
302             name: CACHE_DIRECTORY
303             default: $HOME/opnfv/cache/$INSTALLER_TYPE
304             description: "Directory where the cache to be used during the build is located."
305         - string:
306             name: GS_URL
307             default: artifacts.opnfv.org/$PROJECT{gs-pathname}
308             description: "URL to Google Storage."