Merge "prepare installer info for doctor test"
[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-{inspector}-{stream}'
42       - 'doctor-verify-{installer}-{inspector}-{arch}-{stream}'
43
44 - job-template:
45     name: 'doctor-verify-{inspector}-{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'
69           execution-type: PARALLEL
70           projects:
71             - name: 'doctor-verify-apex-{inspector}-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-{inspector}-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-{inspector}-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-{inspector}-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
107 - job-template:
108     name: 'doctor-verify-{installer}-{inspector}-{arch}-{stream}'
109     disabled: '{obj:disabled}'
110     node: 'doctor-{installer}-{arch}'
111     wrappers:
112       - ssh-agent-wrapper
113       - build-timeout:
114           timeout: 30
115     parameters:
116       - project-parameter:
117           project: '{project}'
118           branch: '{branch}'
119       - '{installer}-defaults'
120       - 'doctor-slave-parameter'
121       - 'doctor-parameter':
122           inspector: '{inspector}'
123     scm:
124       - git-scm-gerrit
125     builders:
126       - 'doctor-verify-installer-inspector-builders-macro'
127     publishers:
128       - 'doctor-verify-publishers-macro'
129
130
131 # -------------------------------
132 # parameter macros
133 # -------------------------------
134 - parameter:
135     name: 'doctor-parameter'
136     parameters:
137       - string:
138           name: INSPECTOR_TYPE
139           default: '{inspector}'
140           description: 'inspector component'
141
142 # -------------------------------
143 # builder macros
144 # -------------------------------
145
146 - builder:
147     name: 'doctor-verify-installer-inspector-builders-macro'
148     builders:
149       # yamllint disable rule:indentation
150       - 'clean-workspace-log'
151       - shell:
152           !include-raw:
153               - ./doctor-env-presetup.sh
154               - ../../utils/fetch_os_creds.sh
155       - shell: |
156           # prepare the env for test
157           source $HOME/opnfv-openrc.sh
158           if [ -f $HOME/os_cacert ]; then
159               export OS_CACERT=$HOME/os_cacert
160           fi
161           source $HOME/opnfv-installer.sh
162
163           # run tox to trigger the test
164           tox -e py34
165
166 # -------------------------------
167 # publisher macros
168 # -------------------------------
169 - publisher:
170     name: 'doctor-verify-publishers-macro'
171     publishers:
172       - archive:
173           artifacts: 'doctor_tests/*.log'
174       - email-jenkins-admins-on-failure
175
176
177 #####################################
178 # trigger macros
179 #####################################
180 - trigger:
181     name: 'doctor-verify'
182     triggers:
183       - gerrit:
184           server-name: 'gerrit.opnfv.org'
185           trigger-on:
186             - patchset-created-event:
187                 exclude-drafts: 'false'
188                 exclude-trivial-rebase: 'false'
189                 exclude-no-code-change: 'false'
190             - draft-published-event
191             - comment-added-contains-event:
192                 comment-contains-value: 'recheck'
193             - comment-added-contains-event:
194                 comment-contains-value: 'reverify'
195           projects:
196             - project-compare-type: 'ANT'
197               project-pattern: '{project}'
198               branches:
199                 - branch-compare-type: 'ANT'
200                   branch-pattern: '**/{branch}'
201               file-paths:
202                 - compare-type: ANT
203                   pattern: '{files}'
204           skip-vote:
205             successful: true
206             failed: true
207             unstable: true
208             notbuilt: true