clean scm defenitions
[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         - git-scm-gerrit
49
50     wrappers:
51         - ssh-agent-wrapper
52         - timeout:
53             timeout: 360
54             fail: true
55
56     triggers:
57         - gerrit:
58             server-name: 'gerrit.opnfv.org'
59             trigger-on:
60                 - patchset-created-event:
61                     exclude-drafts: 'false'
62                     exclude-trivial-rebase: 'false'
63                     exclude-no-code-change: 'false'
64                 - draft-published-event
65                 - comment-added-contains-event:
66                     comment-contains-value: 'recheck'
67                 - comment-added-contains-event:
68                     comment-contains-value: 'reverify'
69             projects:
70               - project-compare-type: 'ANT'
71                 project-pattern: '{project}'
72                 branches:
73                   - branch-compare-type: 'ANT'
74                     branch-pattern: '**/{branch}'
75                 forbidden-file-paths:
76                   - compare-type: ANT
77                     pattern: 'docs/**|.gitignore'
78             readable-message: true
79
80     parameters:
81         - project-parameter:
82             project: '{project}'
83         - gerrit-parameter:
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                     GERRIT_BRANCH=$GERRIT_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                     GERRIT_BRANCH=$GERRIT_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         - gerrit-parameter:
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         - 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         - gerrit-parameter:
197             branch: '{branch}'
198         - 'opnfv-build-defaults'
199         - 'escalator-defaults':
200             gs-pathname: '{gs-pathname}'
201
202     builders:
203         - description-setter:
204             description: "Built on $NODE_NAME"
205         - multijob:
206             name: basic
207             condition: SUCCESSFUL
208             projects:
209                 - name: 'escalator-merge-basic-{stream}'
210                   current-parameters: false
211                   predefined-parameters: |
212                     GERRIT_BRANCH=$GERRIT_BRANCH
213                     GERRIT_REFSPEC=$GERRIT_REFSPEC
214                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
215                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
216                   node-parameters: false
217                   kill-phase-on: FAILURE
218                   abort-all-job: true
219         - multijob:
220             name: build
221             condition: SUCCESSFUL
222             projects:
223                 - name: 'escalator-merge-build-{stream}'
224                   current-parameters: false
225                   predefined-parameters: |
226                     GERRIT_BRANCH=$GERRIT_BRANCH
227                     GERRIT_REFSPEC=$GERRIT_REFSPEC
228                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
229                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
230                   node-parameters: false
231                   kill-phase-on: FAILURE
232                   abort-all-job: true
233
234 - job-template:
235     name: 'escalator-merge-{phase}-{stream}'
236
237     disabled: '{obj:disabled}'
238
239     concurrent: true
240
241     scm:
242         - git-scm-gerrit
243
244     wrappers:
245         - ssh-agent-wrapper
246         - timeout:
247             timeout: 360
248             fail: true
249
250     parameters:
251         - project-parameter:
252             project: '{project}'
253         - gerrit-parameter:
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."