2265dafcef201ea5221dfa2d17464d3ed561300d
[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             branch: '{branch}'
85         - 'opnfv-build-defaults'
86         - 'escalator-defaults':
87             gs-pathname: '{gs-pathname}'
88
89     builders:
90         - description-setter:
91             description: "Built on $NODE_NAME"
92         - multijob:
93             name: basic
94             condition: SUCCESSFUL
95             projects:
96                 - name: 'escalator-verify-basic-{stream}'
97                   current-parameters: false
98                   predefined-parameters: |
99                     BRANCH=$BRANCH
100                     GERRIT_REFSPEC=$GERRIT_REFSPEC
101                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
102                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
103                   node-parameters: false
104                   kill-phase-on: FAILURE
105                   abort-all-job: true
106         - multijob:
107             name: build
108             condition: SUCCESSFUL
109             projects:
110                 - name: 'escalator-verify-build-{stream}'
111                   current-parameters: false
112                   predefined-parameters: |
113                     BRANCH=$BRANCH
114                     GERRIT_REFSPEC=$GERRIT_REFSPEC
115                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
116                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
117                   node-parameters: false
118                   kill-phase-on: FAILURE
119                   abort-all-job: true
120
121 - job-template:
122     name: 'escalator-verify-{phase}-{stream}'
123
124     disabled: '{obj:disabled}'
125
126     concurrent: true
127
128     scm:
129         - git-scm-gerrit
130
131     wrappers:
132         - ssh-agent-wrapper
133         - timeout:
134             timeout: 360
135             fail: true
136
137     parameters:
138         - project-parameter:
139             project: '{project}'
140             branch: '{branch}'
141         - '{slave-label}-defaults'
142         - 'escalator-defaults':
143             gs-pathname: '{gs-pathname}'
144
145     builders:
146         - description-setter:
147             description: "Built on $NODE_NAME"
148         - '{project}-verify-{phase}-macro'
149
150 - job-template:
151     name: 'escalator-merge-{stream}'
152
153     project-type: multijob
154
155     disabled: false
156
157     concurrent: true
158
159     properties:
160         - logrotate-default
161         - throttle:
162             enabled: true
163             max-total: 4
164             option: 'project'
165
166     scm:
167         - git-scm-gerrit
168
169     wrappers:
170         - ssh-agent-wrapper
171         - timeout:
172             timeout: 360
173             fail: true
174
175     triggers:
176         - gerrit:
177             server-name: 'gerrit.opnfv.org'
178             trigger-on:
179                 - change-merged-event
180                 - comment-added-contains-event:
181                     comment-contains-value: 'remerge'
182             projects:
183               - project-compare-type: 'ANT'
184                 project-pattern: '{project}'
185                 branches:
186                   - branch-compare-type: 'ANT'
187                     branch-pattern: '**/{branch}'
188                 forbidden-file-paths:
189                   - compare-type: ANT
190                     pattern: 'docs/**|.gitignore'
191             readable-message: true
192
193     parameters:
194         - project-parameter:
195             project: '{project}'
196             branch: '{branch}'
197         - 'opnfv-build-defaults'
198         - 'escalator-defaults':
199             gs-pathname: '{gs-pathname}'
200
201     builders:
202         - description-setter:
203             description: "Built on $NODE_NAME"
204         - multijob:
205             name: basic
206             condition: SUCCESSFUL
207             projects:
208                 - name: 'escalator-merge-basic-{stream}'
209                   current-parameters: false
210                   predefined-parameters: |
211                     BRANCH=$BRANCH
212                     GERRIT_REFSPEC=$GERRIT_REFSPEC
213                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
214                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
215                   node-parameters: false
216                   kill-phase-on: FAILURE
217                   abort-all-job: true
218         - multijob:
219             name: build
220             condition: SUCCESSFUL
221             projects:
222                 - name: 'escalator-merge-build-{stream}'
223                   current-parameters: false
224                   predefined-parameters: |
225                     BRANCH=$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
233 - job-template:
234     name: 'escalator-merge-{phase}-{stream}'
235
236     disabled: '{obj:disabled}'
237
238     concurrent: true
239
240     scm:
241         - git-scm
242
243     wrappers:
244         - ssh-agent-wrapper
245         - timeout:
246             timeout: 360
247             fail: true
248
249     parameters:
250         - project-parameter:
251             project: '{project}'
252             branch: '{branch}'
253         - '{slave-label}-defaults'
254         - 'escalator-defaults':
255             gs-pathname: '{gs-pathname}'
256
257     builders:
258         - description-setter:
259             description: "Built on $NODE_NAME"
260         - '{project}-merge-{phase}-macro'
261 #####################################
262 # builder macros
263 #####################################
264 - builder:
265     name: 'escalator-verify-basic-macro'
266     builders:
267         - shell:
268             !include-raw: ./escalator-basic.sh
269
270 - builder:
271     name: 'escalator-verify-build-macro'
272     builders:
273         - shell:
274             !include-raw: ./escalator-build.sh
275
276 - builder:
277     name: 'escalator-merge-basic-macro'
278     builders:
279         - shell:
280             !include-raw: ./escalator-basic.sh
281
282 - builder:
283     name: 'escalator-merge-build-macro'
284     builders:
285         - shell:
286             !include-raw:
287                 - ./escalator-build.sh
288                 - ./escalator-upload-artifact.sh
289 #####################################
290 # parameter macros
291 #####################################
292 - parameter:
293     name: 'escalator-defaults'
294     parameters:
295         - string:
296             name: BUILD_DIRECTORY
297             default: $WORKSPACE/build_output
298             description: "Directory where the build artifact will be located upon the completion of the build."
299         - string:
300             name: CACHE_DIRECTORY
301             default: $HOME/opnfv/cache/$INSTALLER_TYPE
302             description: "Directory where the cache to be used during the build is located."
303         - string:
304             name: GS_URL
305             default: artifacts.opnfv.org/$PROJECT{gs-pathname}
306             description: "URL to Google Storage."