39e73b7197e14d723cd8f2745127cefbb5de8b09
[releng.git] / 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
15     stream:
16       - master:
17           branch: '{stream}'
18           gs-pathname: ''
19           disabled: false
20       - iruya: &iruya
21           branch: 'stable/{stream}'
22           gs-pathname: '/{stream}'
23           disabled: false
24       - hunter: &hunter
25           branch: 'stable/{stream}'
26           gs-pathname: '/{stream}'
27           disabled: false
28
29     phase:
30       - 'unit-tests-and-docs':
31           slave-label: 'opnfv-build-ubuntu'
32
33 - job-template:
34     name: 'xtesting-verify-{stream}'
35
36     disabled: '{obj:disabled}'
37
38     project-type: 'multijob'
39
40     parameters:
41       - project-parameter:
42           project: '{project}'
43           branch: '{branch}'
44       - 'opnfv-build-ubuntu-defaults'
45
46     scm:
47       - git-scm-gerrit
48
49     triggers:
50       - 'xtesting-verify-triggers-macro':
51           project: '{project}'
52           branch: '{branch}'
53
54     builders:
55       - shell: |
56           #!/bin/bash
57           # we do nothing here as the main stuff will be done
58           # in phase jobs
59           echo "Triggering phase jobs!"
60       - multijob:
61           name: 'xtesting-build-and-unittest'
62           execution-type: PARALLEL
63           projects:
64             - name: 'xtesting-verify-unit-tests-and-docs-{stream}'
65               current-parameters: false
66               predefined-parameters: |
67                 GERRIT_BRANCH=$GERRIT_BRANCH
68                 GERRIT_REFSPEC=$GERRIT_REFSPEC
69                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
70                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
71               git-revision: true
72               node-parameters: false
73               kill-phase-on: FAILURE
74               abort-all-job: false
75
76 - job-template:
77     name: 'xtesting-verify-{phase}-{stream}'
78
79     disabled: '{obj:disabled}'
80
81     wrappers:
82       - ssh-agent-wrapper
83       - build-timeout:
84           timeout: 30
85
86     parameters:
87       - project-parameter:
88           project: '{project}'
89           branch: '{branch}'
90       - '{slave-label}-defaults'
91
92     scm:
93       - git-scm-gerrit
94
95     builders:
96       - 'xtesting-verify-{phase}-builders-macro'
97
98     publishers:
99       - 'xtesting-verify-{phase}-publishers-macro'
100
101 ################################
102 # job triggers
103 ################################
104 - trigger:
105     name: 'xtesting-verify-triggers-macro'
106     triggers:
107       - gerrit:
108           server-name: 'gerrit.opnfv.org'
109           trigger-on:
110             - patchset-created-event:
111                 exclude-drafts: 'false'
112                 exclude-trivial-rebase: 'false'
113                 exclude-no-code-change: 'false'
114             - draft-published-event
115             - comment-added-contains-event:
116                 comment-contains-value: 'recheck'
117             - comment-added-contains-event:
118                 comment-contains-value: 'reverify'
119           projects:
120             - project-compare-type: 'ANT'
121               project-pattern: '{project}'
122               branches:
123                 - branch-compare-type: 'ANT'
124                   branch-pattern: '**/{branch}'
125               disable-strict-forbidden-file-verification: 'true'
126               forbidden-file-paths:
127                 - compare-type: ANT
128                   pattern: 'docs/**|.gitignore'
129
130 ################################
131 # job builders
132 ################################
133
134 - builder:
135     name: 'xtesting-verify-unit-tests-and-docs-builders-macro'
136     builders:
137       - shell: |
138           cd $WORKSPACE && tox
139
140 ################################
141 # job publishers
142 ################################
143 - publisher:
144     name: 'xtesting-verify-unit-tests-and-docs-publishers-macro'
145     publishers:
146       - junit:
147           results: nosetests.xml
148       - cobertura:
149           report-file: "coverage.xml"
150           only-stable: "true"
151           health-auto-update: "true"
152           stability-auto-update: "true"
153           zoom-coverage-chart: "true"
154           targets:
155             - files:
156                 healthy: 10
157                 unhealthy: 20
158                 failing: 30
159             - method:
160                 healthy: 50
161                 unhealthy: 40
162                 failing: 30
163       - email-jenkins-admins-on-failure