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