Add functest-healthcheck alpine to xci-verify-healthcheck-macro
[releng.git] / jjb / xci / xci-verify-jobs.yml
1 - project:
2     name: 'opnfv-xci-verify'
3
4     project: releng-xci
5 #--------------------------------
6 # branches
7 #--------------------------------
8     stream:
9         - master:
10             branch: '{stream}'
11 #--------------------------------
12 # distros
13 #--------------------------------
14     distro:
15         - 'xenial':
16             disabled: false
17         - 'centos7':
18             disabled: true
19         - 'suse':
20             disabled: true
21 #--------------------------------
22 # type
23 #--------------------------------
24     type:
25         - virtual
26 #--------------------------------
27 # patch verification phases
28 #--------------------------------
29     phase:
30         - 'deploy'
31         - 'healthcheck'
32 #--------------------------------
33 # jobs
34 #--------------------------------
35     jobs:
36         - 'xci-verify-{distro}-{type}-{stream}'
37         - 'xci-verify-{phase}-{type}-{stream}'
38 #--------------------------------
39 # job templates
40 #--------------------------------
41 - job-template:
42     name: 'xci-verify-{distro}-{type}-{stream}'
43
44     project-type: multijob
45
46     disabled: '{obj:disabled}'
47
48     concurrent: true
49
50     properties:
51         - logrotate-default
52         - build-blocker:
53             use-build-blocker: true
54             blocking-jobs:
55                 - 'xci-verify-.*'
56                 - 'bifrost-verify-.*'
57                 - 'bifrost-periodic-.*'
58                 - 'osa-verify-.*'
59                 - 'osa-periodic-.*'
60             block-level: 'NODE'
61
62     wrappers:
63         - ssh-agent-wrapper
64         - build-timeout:
65             timeout: 240
66         - fix-workspace-permissions
67
68     scm:
69         - git-scm-gerrit
70
71     triggers:
72         - gerrit:
73             server-name: 'gerrit.opnfv.org'
74             trigger-on:
75                 - patchset-created-event:
76                     exclude-drafts: 'false'
77                     exclude-trivial-rebase: 'false'
78                     exclude-no-code-change: 'false'
79                 - draft-published-event
80                 - comment-added-contains-event:
81                     comment-contains-value: 'recheck'
82                 - comment-added-contains-event:
83                     comment-contains-value: 'reverify'
84             projects:
85               - project-compare-type: 'ANT'
86                 project-pattern: '{project}'
87                 branches:
88                   - branch-compare-type: 'ANT'
89                     branch-pattern: '**/{branch}'
90                 file-paths:
91                   - compare-type: ANT
92                     pattern: 'xci/**'
93                 disable-strict-forbidden-file-verification: 'true'
94                 forbidden-file-paths:
95                   - compare-type: ANT
96                     pattern: 'bifrost/**'
97                   - compare-type: ANT
98                     pattern: 'openstack-ansible/**'
99                   - compare-type: ANT
100                     pattern: 'puppet-infracloud/**'
101                   - compare-type: ANT
102                     pattern: 'README.rst'
103             readable-message: true
104
105     parameters:
106         - project-parameter:
107             project: '{project}'
108             branch: '{branch}'
109         - label:
110             name: SLAVE_LABEL
111             default: 'xci-virtual-{distro}'
112         - string:
113             name: GIT_BASE
114             default: https://gerrit.opnfv.org/gerrit/$PROJECT
115             description: 'Git URL to use on this Jenkins Slave'
116
117     builders:
118         - description-setter:
119             description: "Built on $NODE_NAME"
120         - multijob:
121             name: deploy
122             condition: SUCCESSFUL
123             projects:
124                 - name: 'xci-verify-deploy-{type}-{stream}'
125                   current-parameters: true
126                   predefined-parameters: |
127                     DISTRO={distro}
128                     DEPLOY_SCENARIO=os-nosdn-nofeature-noha
129                   node-parameters: true
130                   kill-phase-on: FAILURE
131                   abort-all-job: true
132         - multijob:
133             name: healthcheck
134             condition: SUCCESSFUL
135             projects:
136                 - name: 'xci-verify-healthcheck-{type}-{stream}'
137                   current-parameters: true
138                   predefined-parameters: |
139                     DISTRO={distro}
140                     DEPLOY_SCENARIO=os-nosdn-nofeature-noha
141                     FUNCTEST_SUITE_NAME=healthcheck
142                   node-parameters: true
143                   kill-phase-on: NEVER
144                   abort-all-job: true
145
146 - job-template:
147     name: 'xci-verify-{phase}-{type}-{stream}'
148
149     disabled: false
150
151     concurrent: true
152
153     properties:
154         - logrotate-default
155         - build-blocker:
156             use-build-blocker: true
157             blocking-jobs:
158                 - 'xci-verify-deploy-.*'
159                 - 'xci-verify-healthcheck-.*'
160                 - 'bifrost-verify-.*'
161                 - 'bifrost-periodic-.*'
162                 - 'osa-verify-.*'
163                 - 'osa-periodic-.*'
164             block-level: 'NODE'
165
166     parameters:
167         - string:
168             name: DISTRO
169             default: 'xenial'
170         - string:
171             name: DEPLOY_SCENARIO
172             default: 'os-nosdn-nofeature-noha'
173         - string:
174             name: FUNCTEST_SUITE_NAME
175             default: 'healthcheck'
176         - string:
177             name: XCI_FLAVOR
178             default: 'mini'
179         - string:
180             name: OPNFV_RELENG_DEV_PATH
181             default: $WORKSPACE/
182         - string:
183             name: ANSIBLE_VERBOSITY
184             default: '-vvvv'
185         - string:
186             name: GIT_BASE
187             default: https://gerrit.opnfv.org/gerrit/$PROJECT
188             description: 'Git URL to use on this Jenkins Slave'
189
190     wrappers:
191         - ssh-agent-wrapper
192         - build-timeout:
193             timeout: 240
194         - fix-workspace-permissions
195
196     scm:
197         - git-scm-gerrit
198
199     builders:
200         - description-setter:
201             description: "Built on $NODE_NAME"
202         - 'xci-verify-{phase}-macro'
203
204 #--------------------------------
205 # builder macros
206 #--------------------------------
207 - builder:
208     name: 'xci-verify-deploy-macro'
209     builders:
210         - shell: |
211             #!/bin/bash
212
213             # for some reason, the PATH is not set correctly
214             # setting PATH for ansible stuff
215             export PATH=/home/jenkins/.local/bin:$PATH
216
217             cd $WORKSPACE/xci
218             ./xci-deploy.sh
219
220 - builder:
221     name: 'xci-verify-healthcheck-macro'
222     builders:
223         - shell:
224             !include-raw: ../../utils/fetch_os_creds.sh
225         - shell:
226             !include-raw: ../functest/functest-alpine.sh