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