functest: verify: build-timeout, ssh-agent-wrapper
[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-ubuntu-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     wrappers:
104         - ssh-agent-wrapper
105         - build-timeout:
106             timeout: 30
107
108     parameters:
109         - project-parameter:
110             project: '{project}'
111             branch: '{branch}'
112         - '{slave-label}-defaults'
113
114     scm:
115         - git-scm-gerrit
116
117     builders:
118         - 'functest-verify-{phase}-builders-macro'
119
120     publishers:
121         - 'functest-verify-{phase}-publishers-macro'
122
123 - job-template:
124     name: 'functest-docs-upload-{stream}'
125
126     disabled: '{obj:disabled}'
127
128     parameters:
129         - project-parameter:
130             project: '{project}'
131             branch: '{branch}'
132         - 'opnfv-build-ubuntu-defaults'
133
134     scm:
135         - git-scm
136
137     triggers:
138         - 'functest-docs-upload-triggers-macro':
139             project: '{project}'
140             branch: '{branch}'
141
142     builders:
143         - functest-upload-doc-artifact
144
145 ################################
146 # job triggers
147 ################################
148 - trigger:
149     name: 'functest-verify-triggers-macro'
150     triggers:
151         - gerrit:
152             server-name: 'gerrit.opnfv.org'
153             trigger-on:
154                 - patchset-created-event:
155                     exclude-drafts: 'false'
156                     exclude-trivial-rebase: 'false'
157                     exclude-no-code-change: 'false'
158                 - draft-published-event
159                 - comment-added-contains-event:
160                     comment-contains-value: 'recheck'
161                 - comment-added-contains-event:
162                     comment-contains-value: 'reverify'
163             projects:
164               - project-compare-type: 'ANT'
165                 project-pattern: '{project}'
166                 branches:
167                   - branch-compare-type: 'ANT'
168                     branch-pattern: '**/{branch}'
169                 disable-strict-forbidden-file-verification: 'true'
170                 forbidden-file-paths:
171                   - compare-type: ANT
172                     pattern: 'docs/**|.gitignore'
173 - trigger:
174     name: 'functest-docs-upload-triggers-macro'
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                 disable-strict-forbidden-file-verification: 'true'
189                 forbidden-file-paths:
190                   - compare-type: ANT
191                     pattern: 'docs/**|.gitignore'
192 ################################
193 # job builders
194 ################################
195
196 - builder:
197     name: 'functest-verify-unit-tests-and-docs-builders-macro'
198     builders:
199         - shell: |
200             cd $WORKSPACE && tox
201 - builder:
202     name: 'functest-verify-build-x86_64-builders-macro'
203     builders:
204         - shell: |
205             echo "Not activated!"
206 - builder:
207     name: 'functest-verify-build-aarch64-builders-macro'
208     builders:
209         - shell: |
210             echo "Not activated!"
211 - builder:
212     name: 'functest-upload-doc-artifact'
213     builders:
214         - shell: |
215             cd $WORKSPACE && tox -edocs
216             wget -O - https://git.opnfv.org/releng/plain/utils/upload-artifact.sh | bash -s "api/_build" "docs"
217 ################################
218 # job publishers
219 ################################
220 - publisher:
221     name: 'functest-verify-unit-tests-and-docs-publishers-macro'
222     publishers:
223         - junit:
224             results: nosetests.xml
225         - cobertura:
226             report-file: "coverage.xml"
227             only-stable: "true"
228             health-auto-update: "true"
229             stability-auto-update: "true"
230             zoom-coverage-chart: "true"
231             targets:
232                 - files:
233                     healthy: 10
234                     unhealthy: 20
235                     failing: 30
236                 - method:
237                     healthy: 50
238                     unhealthy: 40
239                     failing: 30
240         - email-jenkins-admins-on-failure
241 - publisher:
242     name: 'functest-verify-build-x86_64-publishers-macro'
243     publishers:
244         - email-jenkins-admins-on-failure
245 - publisher:
246     name: 'functest-verify-build-aarch64-publishers-macro'
247     publishers:
248         - email-jenkins-admins-on-failure