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