Merge "auto: verify and merge jobs"
[releng.git] / jjb / doctor / doctor.yaml
1 ---
2 - project:
3     name: doctor
4
5     project: '{name}'
6
7     stream:
8       - master:
9           branch: '{stream}'
10           gs-pathname: ''
11           disabled: false
12       - fraser: &fraser
13           branch: 'stable/{stream}'
14           gs-pathname: '/{stream}'
15           disabled: false
16
17     installer:
18       - 'apex'
19       - 'fuel'
20       - 'daisy'
21
22     arch:
23       - 'x86_64'
24       - 'aarch64'
25
26     inspector:
27       - 'sample'
28       - 'congress'
29
30     exclude:
31       - installer: 'apex'
32         arch: 'aarch64'
33       - installer: 'daisy'
34         arch: 'aarch64'
35       # disabling the following tests due to limitation of PoD owners
36       # these would beenabled again once the PoDs are ready
37       - installer: 'fuel'
38         arch: 'x86_64'
39
40     jobs:
41       - 'doctor-verify-{stream}'
42       - 'doctor-verify-{installer}-{inspector}-{arch}-{stream}'
43
44 - job-template:
45     name: 'doctor-verify-{stream}'
46     disabled: '{obj:disabled}'
47     project-type: 'multijob'
48     parameters:
49       - project-parameter:
50           project: '{project}'
51           branch: '{branch}'
52       - 'doctor-slave-parameter'
53     scm:
54       - git-scm-gerrit
55     triggers:
56       - 'doctor-verify':
57           project: '{project}'
58           branch: '{branch}'
59           files: 'doctor_tests/**'
60
61     builders:
62       - shell: |
63          #!/bin/bash
64          # we do nothing here as the main stuff will be done
65          # in phase jobs
66          echo "Triggering phase jobs!"
67       - multijob:
68           name: 'doctor-verify-sample'
69           execution-type: PARALLEL
70           projects:
71             - name: 'doctor-verify-apex-sample-x86_64-{stream}'
72               predefined-parameters: |
73                 PROJECT=$PROJECT
74                 GERRIT_BRANCH=$GERRIT_BRANCH
75                 GERRIT_REFSPEC=$GERRIT_REFSPEC
76                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
77                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
78               kill-phase-on: FAILURE
79               git-revision: true
80             - name: 'doctor-verify-fuel-sample-x86_64-{stream}'
81               predefined-parameters: |
82                 PROJECT=$PROJECT
83                 GERRIT_BRANCH=$GERRIT_BRANCH
84                 GERRIT_REFSPEC=$GERRIT_REFSPEC
85                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
86                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
87               kill-phase-on: FAILURE
88               git-revision: true
89             - name: 'doctor-verify-fuel-sample-aarch64-{stream}'
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               kill-phase-on: FAILURE
96               git-revision: true
97             - name: 'doctor-verify-daisy-sample-x86_64-{stream}'
98               predefined-parameters: |
99                 PROJECT=$PROJECT
100                 GERRIT_BRANCH=$GERRIT_BRANCH
101                 GERRIT_REFSPEC=$GERRIT_REFSPEC
102                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
103                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
104               kill-phase-on: FAILURE
105               git-revision: true
106       - multijob:
107           name: 'doctor-verify-congress'
108           execution-type: PARALLEL
109           projects:
110             - name: 'doctor-verify-apex-congress-x86_64-{stream}'
111               predefined-parameters: |
112                 PROJECT=$PROJECT
113                 GERRIT_BRANCH=$GERRIT_BRANCH
114                 GERRIT_REFSPEC=$GERRIT_REFSPEC
115                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
116                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
117               kill-phase-on: FAILURE
118               git-revision: true
119             - name: 'doctor-verify-fuel-congress-x86_64-{stream}'
120               predefined-parameters: |
121                 PROJECT=$PROJECT
122                 GERRIT_BRANCH=$GERRIT_BRANCH
123                 GERRIT_REFSPEC=$GERRIT_REFSPEC
124                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
125                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
126               kill-phase-on: FAILURE
127               git-revision: true
128             - name: 'doctor-verify-fuel-congress-aarch64-{stream}'
129               predefined-parameters: |
130                 GERRIT_BRANCH=$GERRIT_BRANCH
131                 GERRIT_REFSPEC=$GERRIT_REFSPEC
132                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
133                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
134               kill-phase-on: FAILURE
135               git-revision: true
136             - name: 'doctor-verify-daisy-congress-x86_64-{stream}'
137               predefined-parameters: |
138                 PROJECT=$PROJECT
139                 GERRIT_BRANCH=$GERRIT_BRANCH
140                 GERRIT_REFSPEC=$GERRIT_REFSPEC
141                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
142                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
143               kill-phase-on: FAILURE
144               git-revision: true
145
146 - job-template:
147     name: 'doctor-verify-{installer}-{inspector}-{arch}-{stream}'
148     disabled: '{obj:disabled}'
149     node: 'doctor-{installer}-{arch}'
150     wrappers:
151       - ssh-agent-wrapper
152       - build-timeout:
153           timeout: 30
154     parameters:
155       - project-parameter:
156           project: '{project}'
157           branch: '{branch}'
158       - '{installer}-defaults'
159       - 'doctor-slave-parameter'
160       - 'doctor-parameter':
161           inspector: '{inspector}'
162     scm:
163       - git-scm-gerrit
164     builders:
165       - 'doctor-verify-installer-inspector-builders-macro'
166     publishers:
167       - 'doctor-verify-publishers-macro'
168
169
170 # -------------------------------
171 # parameter macros
172 # -------------------------------
173 - parameter:
174     name: 'doctor-parameter'
175     parameters:
176       - string:
177           name: INSPECTOR_TYPE
178           default: '{inspector}'
179           description: 'inspector component'
180
181 # -------------------------------
182 # builder macros
183 # -------------------------------
184
185 - builder:
186     name: 'doctor-verify-installer-inspector-builders-macro'
187     builders:
188       # yamllint disable rule:indentation
189       - 'clean-workspace-log'
190       - shell:
191           !include-raw:
192               - ./doctor-env-presetup.sh
193               - ../../utils/fetch_os_creds.sh
194       - shell: |
195           # prepare the env for test
196           source $HOME/opnfv-openrc.sh
197           if [ -f $HOME/os_cacert ]; then
198               export OS_CACERT=$HOME/os_cacert
199           fi
200           source $HOME/opnfv-installer.sh
201
202           # run tox to trigger the test
203           tox -e py34
204
205 # -------------------------------
206 # publisher macros
207 # -------------------------------
208 - publisher:
209     name: 'doctor-verify-publishers-macro'
210     publishers:
211       - archive:
212           artifacts: 'doctor_tests/*.log'
213       - email-jenkins-admins-on-failure
214
215
216 #####################################
217 # trigger macros
218 #####################################
219 - trigger:
220     name: 'doctor-verify'
221     triggers:
222       - gerrit:
223           server-name: 'gerrit.opnfv.org'
224           trigger-on:
225             - patchset-created-event:
226                 exclude-drafts: 'false'
227                 exclude-trivial-rebase: 'false'
228                 exclude-no-code-change: 'false'
229             - draft-published-event
230             - comment-added-contains-event:
231                 comment-contains-value: 'recheck'
232             - comment-added-contains-event:
233                 comment-contains-value: 'reverify'
234           projects:
235             - project-compare-type: 'ANT'
236               project-pattern: '{project}'
237               branches:
238                 - branch-compare-type: 'ANT'
239                   branch-pattern: '**/{branch}'
240               file-paths:
241                 - compare-type: ANT
242                   pattern: '{files}'
243           skip-vote:
244             successful: true
245             failed: true
246             unstable: true
247             notbuilt: true