Merge "Update Global-jjb to master"
[releng.git] / jjb / functest / xtesting-project-jobs.yaml
1 ---
2 ###################################################
3 # All the jobs except verify have been removed!
4 # They will only be enabled on request by projects!
5 ###################################################
6 - project:
7     name: xtesting-project-jobs
8
9     project: 'functest-xtesting'
10
11     jobs:
12       - 'xtesting-verify-{stream}'
13       - 'xtesting-verify-{phase}-{stream}'
14       - 'xtesting-docs-upload-{stream}'
15
16     stream:
17       - master:
18           branch: '{stream}'
19           gs-pathname: ''
20           disabled: false
21       - hunter: &hunter
22           branch: 'stable/{stream}'
23           gs-pathname: '/{stream}'
24           disabled: false
25       - gambia: &gambia
26           branch: 'stable/{stream}'
27           gs-pathname: '/{stream}'
28           disabled: false
29       - fraser: &fraser
30           branch: 'stable/{stream}'
31           gs-pathname: '/{stream}'
32           disabled: false
33
34     phase:
35       - 'unit-tests-and-docs':
36           slave-label: 'opnfv-build-ubuntu'
37       - 'build-x86_64':
38           slave-label: 'opnfv-build-ubuntu'
39       - 'build-aarch64':
40           slave-label: 'opnfv-build-ubuntu-arm'
41
42 - job-template:
43     name: 'xtesting-verify-{stream}'
44
45     disabled: '{obj:disabled}'
46
47     project-type: 'multijob'
48
49     parameters:
50       - project-parameter:
51           project: '{project}'
52           branch: '{branch}'
53       - 'opnfv-build-ubuntu-defaults'
54
55     scm:
56       - git-scm-gerrit
57
58     triggers:
59       - 'xtesting-verify-triggers-macro':
60           project: '{project}'
61           branch: '{branch}'
62
63     builders:
64       - shell: |
65           #!/bin/bash
66           # we do nothing here as the main stuff will be done
67           # in phase jobs
68           echo "Triggering phase jobs!"
69       - multijob:
70           name: 'xtesting-build-and-unittest'
71           execution-type: PARALLEL
72           projects:
73             - name: 'xtesting-verify-unit-tests-and-docs-{stream}'
74               current-parameters: false
75               predefined-parameters: |
76                 GERRIT_BRANCH=$GERRIT_BRANCH
77                 GERRIT_REFSPEC=$GERRIT_REFSPEC
78                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
79                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
80               git-revision: true
81               node-parameters: false
82               kill-phase-on: FAILURE
83               abort-all-job: false
84             - name: 'xtesting-verify-build-x86_64-{stream}'
85               current-parameters: false
86               predefined-parameters: |
87                 GERRIT_BRANCH=$GERRIT_BRANCH
88                 GERRIT_REFSPEC=$GERRIT_REFSPEC
89                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
90                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
91                 ARCH=x86_64
92               git-revision: true
93               node-parameters: false
94               kill-phase-on: FAILURE
95               abort-all-job: false
96             - name: 'xtesting-verify-build-aarch64-{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                 ARCH=aarch64
104               git-revision: true
105               node-parameters: false
106               kill-phase-on: FAILURE
107               abort-all-job: false
108
109 - job-template:
110     name: 'xtesting-verify-{phase}-{stream}'
111
112     disabled: '{obj:disabled}'
113
114     wrappers:
115       - ssh-agent-wrapper
116       - build-timeout:
117           timeout: 30
118
119     parameters:
120       - project-parameter:
121           project: '{project}'
122           branch: '{branch}'
123       - '{slave-label}-defaults'
124
125     scm:
126       - git-scm-gerrit
127
128     builders:
129       - 'xtesting-verify-{phase}-builders-macro'
130
131     publishers:
132       - 'xtesting-verify-{phase}-publishers-macro'
133
134 - job-template:
135     name: 'xtesting-docs-upload-{stream}'
136
137     disabled: '{obj:disabled}'
138
139     parameters:
140       - project-parameter:
141           project: '{project}'
142           branch: '{branch}'
143       - 'opnfv-build-ubuntu-defaults'
144
145     scm:
146       - git-scm
147
148     triggers:
149       - 'xtesting-docs-upload-triggers-macro':
150           project: '{project}'
151           branch: '{branch}'
152
153     builders:
154       - xtesting-upload-doc-artifact
155
156 ################################
157 # job triggers
158 ################################
159 - trigger:
160     name: 'xtesting-verify-triggers-macro'
161     triggers:
162       - gerrit:
163           server-name: 'gerrit.opnfv.org'
164           trigger-on:
165             - patchset-created-event:
166                 exclude-drafts: 'false'
167                 exclude-trivial-rebase: 'false'
168                 exclude-no-code-change: 'false'
169             - draft-published-event
170             - comment-added-contains-event:
171                 comment-contains-value: 'recheck'
172             - comment-added-contains-event:
173                 comment-contains-value: 'reverify'
174           projects:
175             - project-compare-type: 'ANT'
176               project-pattern: '{project}'
177               branches:
178                 - branch-compare-type: 'ANT'
179                   branch-pattern: '**/{branch}'
180               disable-strict-forbidden-file-verification: 'true'
181               forbidden-file-paths:
182                 - compare-type: ANT
183                   pattern: 'docs/**|.gitignore'
184
185 - trigger:
186     name: 'xtesting-docs-upload-triggers-macro'
187     triggers:
188       - gerrit:
189           server-name: 'gerrit.opnfv.org'
190           trigger-on:
191             - change-merged-event
192             - comment-added-contains-event:
193                 comment-contains-value: 'remerge'
194           projects:
195             - project-compare-type: 'ANT'
196               project-pattern: '{project}'
197               branches:
198                 - branch-compare-type: 'ANT'
199                   branch-pattern: '**/{branch}'
200               disable-strict-forbidden-file-verification: 'true'
201               forbidden-file-paths:
202                 - compare-type: ANT
203                   pattern: 'docs/**|.gitignore'
204 ################################
205 # job builders
206 ################################
207
208 - builder:
209     name: 'xtesting-verify-unit-tests-and-docs-builders-macro'
210     builders:
211       - shell: |
212           cd $WORKSPACE && tox
213
214 - builder:
215     name: 'xtesting-verify-build-x86_64-builders-macro'
216     builders:
217       - shell: |
218           echo "Not activated!"
219
220 - builder:
221     name: 'xtesting-verify-build-aarch64-builders-macro'
222     builders:
223       - shell: |
224           echo "Not activated!"
225
226 - builder:
227     name: 'xtesting-upload-doc-artifact'
228     builders:
229       - shell: |
230           cd $WORKSPACE && tox -edocs
231             wget -O - https://git.opnfv.org/releng/plain/utils/upload-artifact.sh | bash -s "api/_build" "docs"
232 ################################
233 # job publishers
234 ################################
235 - publisher:
236     name: 'xtesting-verify-unit-tests-and-docs-publishers-macro'
237     publishers:
238       - junit:
239           results: nosetests.xml
240       - cobertura:
241           report-file: "coverage.xml"
242           only-stable: "true"
243           health-auto-update: "true"
244           stability-auto-update: "true"
245           zoom-coverage-chart: "true"
246           targets:
247             - files:
248                 healthy: 10
249                 unhealthy: 20
250                 failing: 30
251             - method:
252                 healthy: 50
253                 unhealthy: 40
254                 failing: 30
255       - email-jenkins-admins-on-failure
256
257 - publisher:
258     name: 'xtesting-verify-build-x86_64-publishers-macro'
259     publishers:
260       - email-jenkins-admins-on-failure
261
262 - publisher:
263     name: 'xtesting-verify-build-aarch64-publishers-macro'
264     publishers:
265       - email-jenkins-admins-on-failure