492348d631050bae609a1540300d5c6c291b8a4f
[releng.git] / jjb / xci / xci-merge-jobs.yml
1 ---
2 - project:
3     name: 'opnfv-xci-merge'
4
5     # -------------------------------
6     # branches
7     # -------------------------------
8     stream:
9       - master:
10           branch: '{stream}'
11     # -------------------------------
12     # distros
13     # -------------------------------
14     distro:
15       - ubuntu:
16           disabled: false
17       - centos:
18           disabled: false
19       - opensuse:
20           disabled: false
21     # -------------------------------
22     # type
23     # -------------------------------
24     type:
25       - virtual
26     # -------------------------------
27     # patch verification phases
28     # -------------------------------
29     phase:
30       - 'deploy'
31       - 'healthcheck'
32       - 'promote'
33     # -------------------------------
34     # scenarios
35     # -------------------------------
36     scenario:
37       - 'os-odl-sfc':
38           project: sfc
39     # -------------------------------
40     # jobs
41     # -------------------------------
42     jobs:
43       - 'xci-{scenario}-{type}-{distro}-merge-{stream}'
44       - 'xci-{phase}-{type}-{distro}-merge-{stream}'
45 # -------------------------------
46 # job templates
47 # -------------------------------
48 - job-template:
49     name: 'xci-{scenario}-{type}-{distro}-merge-{stream}'
50
51     project-type: multijob
52
53     disabled: '{obj:disabled}'
54
55     concurrent: false
56
57     properties:
58       - logrotate-default
59       - build-blocker:
60           use-build-blocker: true
61           blocking-jobs:
62             - 'xci-verify-{distro}-.*'
63             - 'xci-.*-{distro}-merge-.*'
64             - 'openstack-bifrost-verify-{distro}-.*'
65             - 'xci-osa-verify-{distro}-.*'
66             - 'xci-osa-periodic-{distro}-.*'
67             - 'xci-(os|k8s).*?-virtual-{distro}-.*'
68           block-level: 'NODE'
69       - throttle:
70           max-per-node: 2
71           max-total: 10
72           categories:
73             - xci-verify-virtual
74           option: category
75
76     wrappers:
77       - ssh-agent-wrapper
78       - build-timeout:
79           timeout: 240
80       - fix-workspace-permissions
81
82     scm:
83       - git:
84           credentials-id: '$SSH_CREDENTIAL_ID'
85           url: 'https://gerrit.opnfv.org/gerrit/releng-xci'
86           branches:
87             - 'origin/master'
88           timeout: 15
89
90     triggers:
91       - gerrit:
92           server-name: 'gerrit.opnfv.org'
93           trigger-on:
94             - change-merged-event
95             - comment-added-contains-event:
96                 comment-contains-value: 'remerge'
97           projects:
98             - project-compare-type: 'ANT'
99               project-pattern: '{obj:project}'
100               branches:
101                 - branch-compare-type: 'ANT'
102                   branch-pattern: '**/{branch}'
103               disable-strict-forbidden-file-verification: 'true'
104               file-paths:
105                 - compare-type: ANT
106                   pattern: 'scenarios/**'
107           readable-message: true
108           custom-url: '* $JOB_NAME $BUILD_URL'
109
110     parameters:
111       - project-parameter:
112           project: '{obj:project}'
113           branch: '{branch}'
114       - label:
115           name: SLAVE_LABEL
116           default: 'xci-virtual'
117       - string:
118           name: DEPLOY_SCENARIO
119           default: '{scenario}'
120       - string:
121           name: CLEAN_DIB_IMAGES
122           default: 'true'
123       - string:
124           name: GIT_BASE
125           default: https://gerrit.opnfv.org/gerrit/$PROJECT
126           description: 'Git URL to use on this Jenkins Slave'
127
128     builders:
129       - description-setter:
130           description: "Built on $NODE_NAME"
131       - multijob:
132           name: deploy
133           condition: SUCCESSFUL
134           projects:
135             - name: 'xci-deploy-{type}-{distro}-merge-{stream}'
136               current-parameters: true
137               predefined-parameters: |
138                 PROJECT=$PROJECT
139                 DISTRO={distro}
140                 DEPLOY_SCENARIO={scenario}
141                 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
142                 GERRIT_BRANCH=$GERRIT_BRANCH
143                 GERRIT_REFSPEC=$GERRIT_REFSPEC
144                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
145                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
146               node-parameters: true
147               kill-phase-on: FAILURE
148               abort-all-job: true
149       - multijob:
150           name: healthcheck
151           condition: SUCCESSFUL
152           projects:
153             - name: 'xci-healthcheck-{type}-{distro}-merge-{stream}'
154               current-parameters: true
155               predefined-parameters: |
156                 PROJECT=$PROJECT
157                 DISTRO={distro}
158                 DEPLOY_SCENARIO={scenario}
159                 CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES
160                 FUNCTEST_MODE=tier
161                 FUNCTEST_TIER=healthcheck
162                 GERRIT_BRANCH=$GERRIT_BRANCH
163                 GERRIT_REFSPEC=$GERRIT_REFSPEC
164                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
165                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
166               node-parameters: true
167               kill-phase-on: NEVER
168               abort-all-job: true
169
170 - job-template:
171     name: 'xci-{phase}-{type}-{distro}-merge-{stream}'
172
173     disabled: false
174
175     concurrent: true
176
177     properties:
178       - logrotate-default
179       - build-blocker:
180           use-build-blocker: true
181           blocking-jobs:
182             - '.*-bifrost-verify-.*'
183             - '.*-bifrost-periodic-.*'
184             - 'osa-verify-.*'
185             - 'osa-periodic-.*'
186           block-level: 'NODE'
187
188     parameters:
189       - string:
190           name: PROJECT
191           default: 'releng-xci'
192       - string:
193           name: DISTRO
194           default: 'ubuntu'
195       - string:
196           name: DEPLOY_SCENARIO
197           default: 'os-nosdn-nofeature-noha'
198       - string:
199           name: FUNCTEST_MODE
200           default: 'tier'
201       - string:
202           name: FUNCTEST_SUITE_NAME
203           default: 'healthcheck'
204       - string:
205           name: XCI_FLAVOR
206           default: 'mini'
207       - string:
208           name: CLEAN_DIB_IMAGES
209           default: 'true'
210       - string:
211           name: OPNFV_RELENG_DEV_PATH
212           default: $WORKSPACE/
213       - string:
214           name: INSTALLER_TYPE
215           default: 'osa'
216       - string:
217           name: GIT_BASE
218           default: https://gerrit.opnfv.org/gerrit/$PROJECT
219           description: 'Git URL to use on this Jenkins Slave'
220
221     wrappers:
222       - ssh-agent-wrapper
223       - build-timeout:
224           timeout: 240
225       - fix-workspace-permissions
226
227     scm:
228       - git:
229           credentials-id: '$SSH_CREDENTIAL_ID'
230           url: 'https://gerrit.opnfv.org/gerrit/releng-xci'
231           branches:
232             - 'origin/master'
233           timeout: 15
234
235     builders:
236       - description-setter:
237           description: "Built on $NODE_NAME"
238       - 'xci-merge-{phase}-macro'
239
240 # -------------------------------
241 # builder macros
242 # -------------------------------
243 - builder:
244     name: 'xci-merge-deploy-macro'
245     builders:
246       - shell:
247           !include-raw: ./xci-start-new-vm.sh
248       - shell:
249           !include-raw: ./xci-start-deployment.sh
250
251 - builder:
252     name: 'xci-merge-healthcheck-macro'
253     builders:
254       - shell:
255           !include-raw: ./xci-run-functest.sh
256       - shell:
257           !include-raw: ./xci-cleanup.sh
258
259 - builder:
260     name: 'xci-merge-promote-macro'
261     builders:
262       - shell:
263           !include-raw: ./xci-promote.sh